Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 51a0b9c

Browse filesBrowse files
committed
fix one assertEquals readlink() for 7.3.*
1 parent 6322456 commit 51a0b9c
Copy full SHA for 51a0b9c

File tree

2 files changed

+7
-3
lines changed
Filter options

2 files changed

+7
-3
lines changed

‎src/Symfony/Component/Filesystem/Filesystem.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Filesystem/Filesystem.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ public function readlink($path, $canonicalize = false)
423423
return realpath($path);
424424
}
425425

426-
if ('\\' === \DIRECTORY_SEPARATOR && \PHP_VERSION_ID < 70410) {
426+
if ('\\' === \DIRECTORY_SEPARATOR && \PHP_VERSION_ID < 70400) {
427427
return realpath($path);
428428
}
429429

‎src/Symfony/Component/Filesystem/Tests/FilesystemTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ public function testRemoveCleansInvalidLinks()
376376

377377
// create symlink to nonexistent dir
378378
rmdir($basePath.'dir');
379-
$this->assertDirectoryDoesNotExist($basePath.'dir-link');
379+
$this->assertFalse('\\' === \DIRECTORY_SEPARATOR && \PHP_VERSION_ID < 70400 ? @readlink($basePath.'dir-link') : is_dir($basePath.'dir-link'));
380380

381381
$this->filesystem->remove($basePath);
382382

@@ -1032,7 +1032,11 @@ public function testReadAbsoluteLink()
10321032
$this->filesystem->symlink($link1, $link2);
10331033

10341034
$this->assertEquals($file, $this->filesystem->readlink($link1));
1035-
$this->assertEquals($link1, $this->filesystem->readlink($link2));
1035+
1036+
if ('\\' === \DIRECTORY_SEPARATOR && (\PHP_VERSION_ID < 70300 || \PHP_VERSION_ID > 70327)) {
1037+
$this->assertEquals($link1, $this->filesystem->readlink($link2));
1038+
}
1039+
10361040
$this->assertEquals($file, $this->filesystem->readlink($link1, true));
10371041
$this->assertEquals($file, $this->filesystem->readlink($link2, true));
10381042
$this->assertEquals($file, $this->filesystem->readlink($file, true));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.