From 2e73811211b7ea6de8de578fa50746fe679f2297 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 21 Apr 2015 21:01:52 +0100 Subject: [PATCH] Fix process timeout not being initialized correctly when loading a config without creating a full composer instance, closes #3952, fixes #3946 --- src/Composer/Factory.php | 3 --- src/Composer/IO/BaseIO.php | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Composer/Factory.php b/src/Composer/Factory.php index 504ae8815..9907909b6 100644 --- a/src/Composer/Factory.php +++ b/src/Composer/Factory.php @@ -249,9 +249,6 @@ class Factory if ($fullLoad) { // load auth configs into the IO instance $io->loadConfiguration($config); - - // setup process timeout - ProcessExecutor::setTimeout((int) $config->get('process-timeout')); } // initialize event dispatcher diff --git a/src/Composer/IO/BaseIO.php b/src/Composer/IO/BaseIO.php index 8d684833e..fed455573 100644 --- a/src/Composer/IO/BaseIO.php +++ b/src/Composer/IO/BaseIO.php @@ -13,6 +13,7 @@ namespace Composer\IO; use Composer\Config; +use Composer\Util\ProcessExecutor; abstract class BaseIO implements IOInterface { @@ -75,5 +76,8 @@ abstract class BaseIO implements IOInterface $this->setAuthentication($domain, $cred['username'], $cred['password']); } } + + // setup process timeout + ProcessExecutor::setTimeout((int) $config->get('process-timeout')); } }