diff --git a/packages/autoloader/composer.json b/packages/autoloader/composer.json index 82ea34b09f8a1..5d510a158694a 100644 --- a/packages/autoloader/composer.json +++ b/packages/autoloader/composer.json @@ -4,7 +4,7 @@ "type": "composer-plugin", "license": "GPL-2.0-or-later", "require": { - "composer-plugin-api": "^1.1" + "composer-plugin-api": "^1.1 || ^2.0" }, "require-dev": { "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" diff --git a/packages/autoloader/src/CustomAutoloaderPlugin.php b/packages/autoloader/src/CustomAutoloaderPlugin.php index 189e891e9623b..35c7dd737b6af 100644 --- a/packages/autoloader/src/CustomAutoloaderPlugin.php +++ b/packages/autoloader/src/CustomAutoloaderPlugin.php @@ -53,10 +53,39 @@ public function activate( Composer $composer, IOInterface $io ) { // phpcs:ignor $this->io = $io; } + /** + * Do nothing. + * phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + * + * @param Composer $composer Composer object. + * @param IOInterface $io IO object. + */ + public function deactivate( Composer $composer, IOInterface $io ) { + /* + * Intentionally left empty. This is a PluginInterface method. + * phpcs:enable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + */ + } + + /** + * Do nothing. + * phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + * + * @param Composer $composer Composer object. + * @param IOInterface $io IO object. + */ + public function uninstall( Composer $composer, IOInterface $io ) { + /* + * Intentionally left empty. This is a PluginInterface method. + * phpcs:enable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + */ + } + + /** * Tell composer to listen for events and do something with them. * - * @return array List of succribed events. + * @return array List of subscribed events. */ public static function getSubscribedEvents() { return array(