From ec72101f5b5dd65327273484ed5e17b469bdd61d Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 1 Jan 2026 15:30:05 +0100 Subject: [PATCH 1/2] Reapply "Enable FileCacheStorage for OptimizedDirectorySourceLocatorFactory in tests" This reverts commit d8decc8faa82982e772a64605cae8f6cb4c21c77. --- src/Testing/TestCase.neon | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Testing/TestCase.neon b/src/Testing/TestCase.neon index 4040078660..627dd41a5e 100644 --- a/src/Testing/TestCase.neon +++ b/src/Testing/TestCase.neon @@ -11,11 +11,6 @@ services: fileExtensions: %fileExtensions% excludePaths: %excludePaths% - # overrides service from services.neon - cacheStorage: - class: PHPStan\Cache\MemoryCacheStorage - arguments!: [] - # overrides service from parsers.neon currentPhpVersionSimpleParser!: factory: @currentPhpVersionRichParser From 0ca5d89d9cb6323e55491b103d8f77bb4ccfa6bb Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 1 Jan 2026 15:33:31 +0100 Subject: [PATCH 2/2] added OptimizedDirectorySourceLocatorTest --- .../OptimizedDirectorySourceLocatorTest.neon | 5 +++++ .../OptimizedDirectorySourceLocatorTest.php | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorTest.neon diff --git a/tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorTest.neon b/tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorTest.neon new file mode 100644 index 0000000000..17c72730f7 --- /dev/null +++ b/tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorTest.neon @@ -0,0 +1,5 @@ +services: + # overrides service from services.neon + cacheStorage: + class: PHPStan\Cache\MemoryCacheStorage + arguments!: [] diff --git a/tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorTest.php b/tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorTest.php index 30b555e7b3..751520456b 100644 --- a/tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorTest.php +++ b/tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorTest.php @@ -12,6 +12,7 @@ use TestDirectorySourceLocator\AFoo; use TestDirectorySourceLocator\EmptyClass; use function array_map; +use function array_merge; use function basename; use const PHP_VERSION_ID; @@ -317,4 +318,14 @@ public function testBug5525(): void $this->assertSame('Faker\\Provider\\nl_BE\\Text', $className); } + public static function getAdditionalConfigFiles(): array + { + return array_merge( + parent::getAdditionalConfigFiles(), + [ + __DIR__ . '/OptimizedDirectorySourceLocatorTest.neon', + ], + ); + } + }