diff --git a/lib/Util/BogonFilesFilter.php b/lib/Util/BogonFilesFilter.php index 918987b..0b701b9 100644 --- a/lib/Util/BogonFilesFilter.php +++ b/lib/Util/BogonFilesFilter.php @@ -19,6 +19,7 @@ final class BogonFilesFilter 'dealerdirect/phpcodesniffer-composer-installer/src/Plugin|' . 'myclabs/php-enum/src/PHPUnit/Comparator|' . 'guzzlehttp/guzzle/src/functions|' . + 'phpbench/phpbench/lib/Report/Func/functions|' . 'composer/(?:autoload_\w+|InstalledVersions)' . ')\.php$)' . '#x'; diff --git a/tests/install-deps.php b/tests/install-deps.php index c0baa25..a69ce2c 100644 --- a/tests/install-deps.php +++ b/tests/install-deps.php @@ -24,7 +24,7 @@ continue; } - if (str_contains(dirname($info->getPath()), '/vendor/')) { + if (str_contains(dirname(str_replace(DIRECTORY_SEPARATOR, '/', $info->getPath())), '/vendor/')) { continue; } diff --git a/tests/unit/Finder/ComposerFinderTest.php b/tests/unit/Finder/ComposerFinderTest.php index 066db2f..cff6b41 100644 --- a/tests/unit/Finder/ComposerFinderTest.php +++ b/tests/unit/Finder/ComposerFinderTest.php @@ -276,7 +276,9 @@ public function testFinderShouldFilterByPathCallback(): void /** @runInSeparateProcess */ public function testBogonFilesFilter(): void { - $finder = (new ComposerFinder())->skipBogonFiles(); + $finder = (new ComposerFinder()) + ->useAutoloading(false) + ->skipBogonFiles(); self::assertNotEmpty(iterator_to_array($finder)); }