Skip to content

Commit 0e9cba4

Browse files
Merge branch '5.4' into 6.0
* 5.4: Fix CS in README files Fix markdown [HttpKernel] Fixes tests for PHP7.4+ fix test [HttpKernel] Throw when HttpKernel is created and the env is empty [FrameworkBundle] Deprecate the `AdapterInterface` autowiring alias, use `CacheItemPoolInterface` instead [Filesystem] fix readlink for Windows
2 parents a2fc78f + 3481163 commit 0e9cba4

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

Filesystem.php

-8
Original file line numberDiff line numberDiff line change
@@ -423,14 +423,6 @@ public function readlink(string $path, bool $canonicalize = false)
423423
return null;
424424
}
425425

426-
if ('\\' === \DIRECTORY_SEPARATOR) {
427-
$path = readlink($path);
428-
}
429-
430-
return realpath($path);
431-
}
432-
433-
if ('\\' === \DIRECTORY_SEPARATOR) {
434426
return realpath($path);
435427
}
436428

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ The Filesystem component provides basic utilities for the filesystem.
66
Resources
77
---------
88

9-
* [Documentation](https://symfony.com/doc/current/components/filesystem.html)
10-
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
11-
* [Report issues](https://github.com/symfony/symfony/issues) and
12-
[send Pull Requests](https://github.com/symfony/symfony/pulls)
13-
in the [main Symfony repository](https://github.com/symfony/symfony)
9+
* [Documentation](https://symfony.com/doc/current/components/filesystem.html)
10+
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
11+
* [Report issues](https://github.com/symfony/symfony/issues) and
12+
[send Pull Requests](https://github.com/symfony/symfony/pulls)
13+
in the [main Symfony repository](https://github.com/symfony/symfony)

Tests/FilesystemTest.php

+2-1
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->assertFalse('\\' === \DIRECTORY_SEPARATOR ? @readlink($basePath.'dir-link') : is_dir($basePath.'dir-link'));
379+
$this->assertFalse(is_dir($basePath.'dir-link'));
380380

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

@@ -1076,6 +1076,7 @@ public function testReadAbsoluteLink()
10761076
$this->filesystem->symlink($link1, $link2);
10771077

10781078
$this->assertEquals($file, $this->filesystem->readlink($link1));
1079+
10791080
$this->assertEquals($link1, $this->filesystem->readlink($link2));
10801081
$this->assertEquals($file, $this->filesystem->readlink($link1, true));
10811082
$this->assertEquals($file, $this->filesystem->readlink($link2, true));

0 commit comments

Comments
 (0)