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:
parent
f00f5113bf
commit
9402a9fb3c
3 changed files with 14 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue