Skip to content

Commit

Permalink
Closes #4835
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Nov 29, 2021
1 parent c5d9618 commit f45aca7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions ChangeLog-8.5.md
Expand Up @@ -7,6 +7,7 @@ All notable changes of the PHPUnit 8.5 release series are documented in this fil
### Changed

* [#4812](https://github.com/sebastianbergmann/phpunit/issues/4812): Do not enforce time limits when a debugging session through DBGp is active
* [#4835](https://github.com/sebastianbergmann/phpunit/issues/4835): Support for `$GLOBALS['_composer_autoload_path']` introduced in Composer 2.2

## [8.5.21] - 2021-09-25

Expand Down
18 changes: 12 additions & 6 deletions phpunit
Expand Up @@ -58,15 +58,21 @@ if (!ini_get('date.timezone')) {
ini_set('date.timezone', 'UTC');
}

foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {
if (file_exists($file)) {
define('PHPUNIT_COMPOSER_INSTALL', $file);
if (isset($GLOBALS['_composer_autoload_path'])) {
define('PHPUNIT_COMPOSER_INSTALL', $GLOBALS['_composer_autoload_path']);

break;
unset($GLOBALS['_composer_autoload_path']);
} else {
foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {
if (file_exists($file)) {
define('PHPUNIT_COMPOSER_INSTALL', $file);

break;
}
}
}

unset($file);
unset($file);
}

if (!defined('PHPUNIT_COMPOSER_INSTALL')) {
fwrite(
Expand Down

0 comments on commit f45aca7

Please sign in to comment.