Skip to content

Commit

Permalink
chore: add phpbench file to bogon files regex
Browse files Browse the repository at this point in the history
  • Loading branch information
alekitto committed Dec 1, 2024
1 parent ed1ce62 commit 1e57e7f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/Util/BogonFilesFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion tests/install-deps.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
continue;
}

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

Expand Down
4 changes: 3 additions & 1 deletion tests/unit/Finder/ComposerFinderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 1e57e7f

Please sign in to comment.