Skip to content

Commit

Permalink
fixes circular dependency issue at zf1s/zf1 when composer2 is used (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
partikus committed Jul 1, 2022
1 parent e6392c4 commit f0e20f9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions PHPUnit/Util/GlobalState.php
Expand Up @@ -197,6 +197,13 @@ public static function getIncludedFilesAsString()
if (defined('__PHPUNIT_PHAR__')) {
$prefix = 'phar://' . __PHPUNIT_PHAR__ . '/';
}

// Do not process bootstrap script - composer v2 compatibility
// https://github.com/composer/composer/issues/10387#issuecomment-1002942296
// https://github.com/sebastianbergmann/phpunit/pull/4846
while (strpos($files[0], 'bin/phpunit') !== false) {
array_shift($files);
}

for ($i = count($files) - 1; $i > 0; $i--) {
$file = $files[$i];
Expand Down

0 comments on commit f0e20f9

Please sign in to comment.