Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store the outer filesystem's filename in a constant for later use #649

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

johnpbloch
Copy link

This is related to (and required for) wp-cli/wp-cli#5962

This will set an extra constant that stores the outer filesystem's filename. When that filename doesn't match with the phar's internal filename (wp-cli.phar), the phar can't find internal files that use __DIR__ for a reference point to the file.

@johnpbloch johnpbloch requested a review from a team as a code owner July 13, 2024 19:07
@schlessera
Copy link
Member

I don't think this approach is ideal. It is still very hacky and it has issues with multibyte strings in filesystems.

I think this needs to be solved using https://www.php.net/manual/en/phar.running.php in the correct way. I'll have a stab at it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants