Skip to content

Commit b0d98b9

Browse files
authored
Load ProxyManager before running command to fix autoload order (composer#11943)
1 parent 9f84f0c commit b0d98b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Composer/Console/Application.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,8 @@ function_exists('php_uname') ? php_uname('s') . ' / ' . php_uname('r') : 'Unknow
379379
}
380380

381381
try {
382+
$proxyManager = ProxyManager::getInstance();
383+
382384
if ($input->hasParameterOption('--profile')) {
383385
$startTime = microtime(true);
384386
$this->io->enableDebugging($startTime);
@@ -400,7 +402,7 @@ function_exists('php_uname') ? php_uname('s') . ' / ' . php_uname('r') : 'Unknow
400402
$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');
401403
}
402404

403-
if (ProxyManager::getInstance()->needsTransitionWarning()) {
405+
if ($proxyManager->needsTransitionWarning()) {
404406
$io->writeError('');
405407
$io->writeError('<warning>Composer now requires separate proxy environment variables for HTTP and HTTPS requests.</warning>');
406408
$io->writeError('<warning>Please set `https_proxy` in addition to your existing proxy environment variables.</warning>');

0 commit comments

Comments
 (0)