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 (composer#11014)
  • Loading branch information
ondrejmirtes authored and emahorvat52 committed Jan 18, 2023
1 parent 7d701eb commit abaed19
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/bootstrap.php
Expand Up @@ -10,6 +10,7 @@
* file that was distributed with this source code.
*/

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

This comment has been minimized.

Copy link
@emahorvat52

emahorvat52 May 25, 2023

Owner

use Composer\InstalledVersions;


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

1 comment on commit abaed19

@gulshankumar4578
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now working

Please sign in to comment.