Skip to content

Commit a4d58c5

Browse files
committed
minor #13147 [2.3] for consistency, use value of DIRECTORY_SEPARATOR to detect Windows (xabbuh)
This PR was merged into the 2.3 branch. Discussion ---------- [2.3] for consistency, use value of DIRECTORY_SEPARATOR to detect Windows | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | This commit unifies the detection of Windows builds across the Symfony codebase. Commits ------- 20a427d use value of DIRECTORY_SEPARATOR to detect Windows
2 parents cd78885 + dcf809e commit a4d58c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/Functional/SecurityRoutingIntegrationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testRoutingErrorIsNotExposedForProtectedResourceWhenAnonymous($c
3030
*/
3131
public function testRoutingErrorIsExposedWhenNotProtected($config)
3232
{
33-
if (defined('PHP_WINDOWS_VERSION_BUILD') && PHP_VERSION_ID < 50309) {
33+
if ('\\' === DIRECTORY_SEPARATOR && PHP_VERSION_ID < 50309) {
3434
$this->markTestSkipped('Test hangs on Windows & PHP due to https://bugs.php.net/bug.php?id=60120 fixed in http://svn.php.net/viewvc?view=revision&revision=318366');
3535
}
3636

@@ -46,7 +46,7 @@ public function testRoutingErrorIsExposedWhenNotProtected($config)
4646
*/
4747
public function testRoutingErrorIsNotExposedForProtectedResourceWhenLoggedInWithInsufficientRights($config)
4848
{
49-
if (defined('PHP_WINDOWS_VERSION_BUILD') && PHP_VERSION_ID < 50309) {
49+
if ('\\' === DIRECTORY_SEPARATOR && PHP_VERSION_ID < 50309) {
5050
$this->markTestSkipped('Test hangs on Windows & PHP due to https://bugs.php.net/bug.php?id=60120 fixed in http://svn.php.net/viewvc?view=revision&revision=318366');
5151
}
5252

0 commit comments

Comments
 (0)