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
Fix realpath() failing on Windows. #5530
Conversation
|
Thanks for the patch, but I do wonder.. is there a case where two realpath() is not enough and we need 3? or 4? Also is there a way to write a unit test for this? It'd be quite nice to avoid future regressions. |
|
on which phpversion does this issue occur? |
|
As this is a bug in PHP itself, it MAY be possible. Pick your one. |
|
@staabm , on all windows versions. |
|
My hope with this patch (yes, I've considered doing a heavier version of it accounting for possible multiple unresolved paths) is that there won't be many people overlinking their filesystems, as conditions for this issue to arise are rather specific. |
|
@AnrDaemon Maybe reference the link to this ticket in the code comment ? |
|
@SoboLAN , good idea, done. |
In certain scenarios, realpath() failing to completely unwind all symlinks, resulting in Composer producing autogenerated mappings similar to this:
After a rather silly looking patch, it works much better: