Skip to content

Commit

Permalink
Tests bootstrap - require InstalledVersions only if it's not declared…
Browse files Browse the repository at this point in the history
… yet (#11014)
  • Loading branch information
ondrejmirtes authored and Seldaek committed Aug 31, 2022
1 parent c10854d commit d951c48
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* file that was distributed with this source code.
*/

use Composer\InstalledVersions;
use Composer\Util\Platform;

error_reporting(E_ALL);
Expand All @@ -19,7 +20,11 @@
}

require __DIR__.'/../src/bootstrap.php';
require __DIR__.'/../src/Composer/InstalledVersions.php';

if (!class_exists(InstalledVersions::class, false)) {
require __DIR__.'/../src/Composer/InstalledVersions.php';
}

require __DIR__.'/Composer/Test/TestCase.php';

Platform::putEnv('COMPOSER_TESTS_ARE_RUNNING', '1');
Expand Down

0 comments on commit d951c48

Please sign in to comment.