From c3e325f345e2ca3e3a110294e8914a747b16150d Mon Sep 17 00:00:00 2001 From: Micah Wood Date: Fri, 24 Apr 2020 10:36:31 -0400 Subject: [PATCH] Updates to support version 2+ of the composer plugin API --- composer.json | 2 +- src/GithubArchiveInstaller.php | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 826d51c..1d49c86 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "composer-plugin-api": "^1.1" + "composer-plugin-api": "^1.1 || ^2.0" }, "autoload": { "psr-4": { diff --git a/src/GithubArchiveInstaller.php b/src/GithubArchiveInstaller.php index 29f3a3f..f1dbff2 100644 --- a/src/GithubArchiveInstaller.php +++ b/src/GithubArchiveInstaller.php @@ -42,7 +42,7 @@ class GithubArchiveInstaller implements PluginInterface, EventSubscriberInterfac * Apply plugin modifications to Composer. * * @param \Composer\Composer $composer Composer instance - * @param \Composer\IO\IOInterface $io Input/Output interface + * @param \Composer\IO\IOInterface $io Input/Output interface */ public function activate( Composer $composer, IOInterface $io ) { $this->composer = $composer; @@ -114,4 +114,24 @@ public function getPackageFromOperation( OperationInterface $operation ) { return $operation->getPackage(); } + /** + * Deactivate + * + * @param \Composer\Composer $composer Composer instance + * @param \Composer\IO\IOInterface $io Input/Output interface + */ + public function deactivate( Composer $composer, IOInterface $io ) { + // Nothing to do here. + } + + /** + * Uninstall + * + * @param \Composer\Composer $composer Composer instance + * @param \Composer\IO\IOInterface $io Input/Output interface + */ + public function uninstall( Composer $composer, IOInterface $io ) { + // Nothing to do here. + } + }