Skip to content

Conversation

@nicolas-grekas
Copy link
Member

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #38123
License MIT
Doc PR -

This allows compiling on Windows and running on Linux (Docker).

@fabpot
Copy link
Member

fabpot commented Sep 10, 2020

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 44dd80f into symfony:4.4 Sep 10, 2020
$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);
Copy link
Member

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) ?

Copy link
Member Author

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 into DIRECTORY_SEPARATOR
On Linux, / are kept as is (and they work on Windows as you know)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants