diff --git a/src/Composer/Plugin/PluginInterface.php b/src/Composer/Plugin/PluginInterface.php index ebbbe0026..2c38d0f8d 100644 --- a/src/Composer/Plugin/PluginInterface.php +++ b/src/Composer/Plugin/PluginInterface.php @@ -22,9 +22,7 @@ use Composer\Composer; interface PluginInterface { /** - * Apply plugin modifications to the passed in composer object - * - * @param Composer $composer + * Apply plugin modifications to composer */ - public function activate(Composer $composer); + public function activate(); } diff --git a/src/Composer/Plugin/PluginManager.php b/src/Composer/Plugin/PluginManager.php index 74c0081c3..f97900679 100644 --- a/src/Composer/Plugin/PluginManager.php +++ b/src/Composer/Plugin/PluginManager.php @@ -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); diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php index 3db55ab6d..29ed98321 100644 --- a/src/Composer/Util/RemoteFilesystem.php +++ b/src/Composer/Util/RemoteFilesystem.php @@ -76,6 +76,16 @@ class RemoteFilesystem return $this->get($originUrl, $fileUrl, $options, null, $progress); } + /** + * Retrieve the options set in the constructor + * + * @return array Options + */ + public function getOptions() + { + return $this->options; + } + /** * Get file content or copy action. *