2022-02-23 15:58:18 +00:00
|
|
|
<?php declare(strict_types=1);
|
2011-04-05 15:37:19 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* This file is part of Composer.
|
|
|
|
*
|
|
|
|
* (c) Nils Adermann <naderman@naderman.de>
|
2011-10-27 20:08:46 +00:00
|
|
|
* Jordi Boggiano <j.boggiano@seld.be>
|
2011-04-05 15:37:19 +00:00
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
2022-08-22 13:00:18 +00:00
|
|
|
use Composer\InstalledVersions;
|
2020-10-01 14:42:02 +00:00
|
|
|
use Composer\Util\Platform;
|
|
|
|
|
2012-06-27 05:27:01 +00:00
|
|
|
error_reporting(E_ALL);
|
|
|
|
|
2014-04-14 11:55:17 +00:00
|
|
|
if (function_exists('date_default_timezone_set') && function_exists('date_default_timezone_get')) {
|
|
|
|
date_default_timezone_set(@date_default_timezone_get());
|
|
|
|
}
|
|
|
|
|
2014-03-01 19:39:06 +00:00
|
|
|
require __DIR__.'/../src/bootstrap.php';
|
2022-08-22 13:00:18 +00:00
|
|
|
|
|
|
|
if (!class_exists(InstalledVersions::class, false)) {
|
|
|
|
require __DIR__.'/../src/Composer/InstalledVersions.php';
|
|
|
|
}
|
|
|
|
|
2020-10-01 14:42:02 +00:00
|
|
|
Platform::putEnv('COMPOSER_TESTS_ARE_RUNNING', '1');
|
2022-05-11 14:05:35 +00:00
|
|
|
|
2023-08-30 13:02:15 +00:00
|
|
|
// ensure Windows color support detection does not attempt to use colors
|
|
|
|
// as this is dependent on env vars and not actual stream capabilities, see
|
|
|
|
// https://github.com/composer/composer/issues/11598
|
|
|
|
Platform::putEnv('NO_COLOR', '1');
|
|
|
|
|
2022-05-11 14:05:35 +00:00
|
|
|
// symfony/phpunit-bridge sets some default env vars which we do not need polluting the test env
|
|
|
|
Platform::clearEnv('COMPOSER');
|
|
|
|
Platform::clearEnv('COMPOSER_VENDOR_DIR');
|
|
|
|
Platform::clearEnv('COMPOSER_BIN_DIR');
|