Skip to content

Commit 1d43f41

Browse files
author
Robin Chalas
committed
minor #29670 Fix wrong calls to clearstatcache (alcaeus)
This PR was merged into the 3.4 branch. Discussion ---------- Fix wrong calls to clearstatcache | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | - <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | - <!-- required for new features --> This was discovered while fixing doctrine/DoctrineMongoDBBundle#510: The first argument is a bool, not the path string. It makes sense to also clear the realpath cache since it doesn't have any performance implications on the tests themselves. Commits ------- 5f3c6c9 Fix wrong calls to clearstatcache
2 parents db9ef77 + 5f3c6c9 commit 1d43f41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/FinderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ public function testAccessDeniedException()
697697

698698
// restore original permissions
699699
chmod($testDir, 0777);
700-
clearstatcache($testDir);
700+
clearstatcache(true, $testDir);
701701

702702
if ($couldRead) {
703703
$this->markTestSkipped('could read test files while test requires unreadable');
@@ -723,7 +723,7 @@ public function testIgnoredAccessDeniedException()
723723

724724
// restore original permissions
725725
chmod($testDir, 0777);
726-
clearstatcache($testDir);
726+
clearstatcache(true, $testDir);
727727

728728
if ($couldRead) {
729729
$this->markTestSkipped('could read test files while test requires unreadable');

0 commit comments

Comments
 (0)