1
0
Fork 0

Load ProxyManager before running command to fix autoload order (#11943)

pull/11950/head
Barry vd. Heuvel 2024-04-22 21:12:57 +02:00 committed by GitHub
parent 9f84f0c32b
commit b0d98b9301
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -379,6 +379,8 @@ class Application extends BaseApplication
} }
try { try {
$proxyManager = ProxyManager::getInstance();
if ($input->hasParameterOption('--profile')) { if ($input->hasParameterOption('--profile')) {
$startTime = microtime(true); $startTime = microtime(true);
$this->io->enableDebugging($startTime); $this->io->enableDebugging($startTime);
@ -400,7 +402,7 @@ class Application extends BaseApplication
$io->writeError('<info>Memory usage: '.round(memory_get_usage() / 1024 / 1024, 2).'MiB (peak: '.round(memory_get_peak_usage() / 1024 / 1024, 2).'MiB), time: '.round(microtime(true) - $startTime, 2).'s'); $io->writeError('<info>Memory usage: '.round(memory_get_usage() / 1024 / 1024, 2).'MiB (peak: '.round(memory_get_peak_usage() / 1024 / 1024, 2).'MiB), time: '.round(microtime(true) - $startTime, 2).'s');
} }
if (ProxyManager::getInstance()->needsTransitionWarning()) { if ($proxyManager->needsTransitionWarning()) {
$io->writeError(''); $io->writeError('');
$io->writeError('<warning>Composer now requires separate proxy environment variables for HTTP and HTTPS requests.</warning>'); $io->writeError('<warning>Composer now requires separate proxy environment variables for HTTP and HTTPS requests.</warning>');
$io->writeError('<warning>Please set `https_proxy` in addition to your existing proxy environment variables.</warning>'); $io->writeError('<warning>Please set `https_proxy` in addition to your existing proxy environment variables.</warning>');