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

FileHelper - fix normalizing paths with protocol:// on Windows #632

Merged
merged 2 commits into from
Jun 10, 2020

Conversation

ondrejmirtes
Copy link
Contributor

Previously it generated path with phar:\\....

src/Util/FileHelper.php Outdated Show resolved Hide resolved
src/Util/FileHelper.php Outdated Show resolved Hide resolved
Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @ondrejmirtes!


$path = 'phar://C:/Users/ondrej/phpstan.phar/src/TrinaryLogic.php';
self::assertSame(
'phar://C:\Users\ondrej\phpstan.phar\src\TrinaryLogic.php',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting that phars still have borked file paths 🤷

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get it - 'phar://C:\Users\ondrej\phpstan.phar\src\TrinaryLogic.php' is what we want here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but effectively this is no longer a filesystem path.

Anyway, all good with this patch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :)

@Ocramius Ocramius added the bug label Jun 10, 2020
@Ocramius Ocramius added this to the 4.6.0 milestone Jun 10, 2020
@Ocramius Ocramius self-assigned this Jun 10, 2020
@Ocramius Ocramius merged commit d0868d4 into Roave:master Jun 10, 2020
@ondrejmirtes ondrejmirtes deleted the filehelper branch June 10, 2020 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants