Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DI] dump OS-indepent paths in the compiled container#38139
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
280a024 tof0869a8Comparef0869a8 to4dcf9e7Comparefabpot commentedSep 10, 2020
Thank you@nicolas-grekas. |
| $dump =print_r($dumper->dump(['as_files' =>true,'file' =>__DIR__,'hot_path_tag' =>'hot']),true); | ||
| if ('\\' === \DIRECTORY_SEPARATOR) { | ||
| $dump =str_replace('\\\\Fixtures\\\\includes\\\\foo.php','/Fixtures/includes/foo.php',$dump); | ||
| $dump =str_replace("'.\\DIRECTORY_SEPARATOR.'",'/',$dump); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
why this replacement here rather than updating the fixture to contain the OS-independent output (which would allow to see that it is actually generated) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Well, the output is not OS-independent: the paths are.
On Windows,\ are turned intoDIRECTORY_SEPARATOR
On Linux,/ are kept as is (and they work on Windows as you know)
This allows compiling on Windows and running on Linux (Docker).