diff --git a/src/Composer/Composer.php b/src/Composer/Composer.php index c7ab40039..57cfdffe1 100644 --- a/src/Composer/Composer.php +++ b/src/Composer/Composer.php @@ -14,6 +14,7 @@ namespace Composer; use Composer\Package\RootPackageInterface; use Composer\Package\Locker; +use Composer\Util\Loop; use Composer\Repository\RepositoryManager; use Composer\Installer\InstallationManager; use Composer\Plugin\PluginManager; @@ -82,7 +83,7 @@ class Composer } /** - * @var Package\RootPackageInterface + * @var RootPackageInterface */ private $package; @@ -91,6 +92,11 @@ class Composer */ private $locker; + /** + * @var Loop + */ + private $loop; + /** * @var Repository\RepositoryManager */ @@ -132,7 +138,7 @@ class Composer private $archiveManager; /** - * @param Package\RootPackageInterface $package + * @param RootPackageInterface $package * @return void */ public function setPackage(RootPackageInterface $package) @@ -141,7 +147,7 @@ class Composer } /** - * @return Package\RootPackageInterface + * @return RootPackageInterface */ public function getPackage() { @@ -165,7 +171,7 @@ class Composer } /** - * @param Package\Locker $locker + * @param Locker $locker */ public function setLocker(Locker $locker) { @@ -173,7 +179,7 @@ class Composer } /** - * @return Package\Locker + * @return Locker */ public function getLocker() { @@ -181,7 +187,23 @@ class Composer } /** - * @param Repository\RepositoryManager $manager + * @param Loop $loop + */ + public function setLoop(loop $loop) + { + $this->loop = $loop; + } + + /** + * @return Loop + */ + public function getLoop() + { + return $this->loop; + } + + /** + * @param RepositoryManager $manager */ public function setRepositoryManager(RepositoryManager $manager) { @@ -189,7 +211,7 @@ class Composer } /** - * @return Repository\RepositoryManager + * @return RepositoryManager */ public function getRepositoryManager() { @@ -197,7 +219,7 @@ class Composer } /** - * @param Downloader\DownloadManager $manager + * @param DownloadManager $manager */ public function setDownloadManager(DownloadManager $manager) { @@ -205,7 +227,7 @@ class Composer } /** - * @return Downloader\DownloadManager + * @return DownloadManager */ public function getDownloadManager() { @@ -229,7 +251,7 @@ class Composer } /** - * @param Installer\InstallationManager $manager + * @param InstallationManager $manager */ public function setInstallationManager(InstallationManager $manager) { @@ -237,7 +259,7 @@ class Composer } /** - * @return Installer\InstallationManager + * @return InstallationManager */ public function getInstallationManager() { @@ -245,7 +267,7 @@ class Composer } /** - * @param Plugin\PluginManager $manager + * @param PluginManager $manager */ public function setPluginManager(PluginManager $manager) { @@ -253,7 +275,7 @@ class Composer } /** - * @return Plugin\PluginManager + * @return PluginManager */ public function getPluginManager() { @@ -277,7 +299,7 @@ class Composer } /** - * @param Autoload\AutoloadGenerator $autoloadGenerator + * @param AutoloadGenerator $autoloadGenerator */ public function setAutoloadGenerator(AutoloadGenerator $autoloadGenerator) { @@ -285,7 +307,7 @@ class Composer } /** - * @return Autoload\AutoloadGenerator + * @return AutoloadGenerator */ public function getAutoloadGenerator() { diff --git a/src/Composer/Factory.php b/src/Composer/Factory.php index dd1a7b308..9160ce2f5 100644 --- a/src/Composer/Factory.php +++ b/src/Composer/Factory.php @@ -336,6 +336,7 @@ class Factory $httpDownloader = self::createHttpDownloader($io, $config); $loop = new Loop($httpDownloader); + $composer->setLoop($loop); // initialize event dispatcher $dispatcher = new EventDispatcher($composer, $io);