Skip to content

Commit 1bc2fec

Browse files
committed
use value of DIRECTORY_SEPARATOR to detect Windows
This commit unifies the detection of Windows builds across the Symfony codebase.
1 parent fa872c8 commit 1bc2fec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/KernelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ public function doStuff()
341341

342342
// Heredocs are preserved, making the output mixing Unix and Windows line
343343
// endings, switching to "\n" everywhere on Windows to avoid failure.
344-
if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
344+
if ('\\' === DIRECTORY_SEPARATOR) {
345345
$expected = str_replace("\r\n", "\n", $expected);
346346
$output = str_replace("\r\n", "\n", $output);
347347
}

0 commit comments

Comments
 (0)