1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-11 09:32:55 +00:00

Plugins receive composer and io objects on construction already

This commit is contained in:
Nils Adermann 2013-08-14 18:47:25 +02:00
parent f00f5113bf
commit 9402a9fb3c
3 changed files with 14 additions and 6 deletions

View file

@ -64,7 +64,7 @@ class PluginManager
public function addPlugin(PluginInterface $plugin)
{
$this->plugins[] = $plugin;
$plugin->activate($this->composer);
$plugin->activate();
if ($plugin instanceof EventSubscriberInterface) {
$this->composer->getEventDispatcher()->addSubscriber($plugin);
@ -102,7 +102,7 @@ class PluginManager
self::$classCounter++;
}
$plugin = new $class($this->io, $this->composer);
$plugin = new $class($this->composer, $this->io);
if ($oldInstallerPlugin) {
$this->composer->getInstallationManager()->addInstaller($installer);