Skip to content

Commit 1e57e7f

Browse files
committed
chore: add phpbench file to bogon files regex
1 parent ed1ce62 commit 1e57e7f

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

lib/Util/BogonFilesFilter.php

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ final class BogonFilesFilter
1919
'dealerdirect/phpcodesniffer-composer-installer/src/Plugin|' .
2020
'myclabs/php-enum/src/PHPUnit/Comparator|' .
2121
'guzzlehttp/guzzle/src/functions|' .
22+
'phpbench/phpbench/lib/Report/Func/functions|' .
2223
'composer/(?:autoload_\w+|InstalledVersions)' .
2324
')\.php$)' .
2425
'#x';

tests/install-deps.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
continue;
2525
}
2626

27-
if (str_contains(dirname($info->getPath()), '/vendor/')) {
27+
if (str_contains(dirname(str_replace(DIRECTORY_SEPARATOR, '/', $info->getPath())), '/vendor/')) {
2828
continue;
2929
}
3030

tests/unit/Finder/ComposerFinderTest.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,9 @@ public function testFinderShouldFilterByPathCallback(): void
276276
/** @runInSeparateProcess */
277277
public function testBogonFilesFilter(): void
278278
{
279-
$finder = (new ComposerFinder())->skipBogonFiles();
279+
$finder = (new ComposerFinder())
280+
->useAutoloading(false)
281+
->skipBogonFiles();
280282

281283
self::assertNotEmpty(iterator_to_array($finder));
282284
}

0 commit comments

Comments
 (0)