From eff6da99cfb5fe1fc60990672d2667c402eb3585 Mon Sep 17 00:00:00 2001 From: Daniel Johnson Date: Tue, 17 Nov 2020 19:15:28 -0500 Subject: [PATCH] Add Composer 2 support (#25) Co-authored-by: Daniel Johnson --- composer.json | 2 +- src/Extender.php | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ef58aea..1ebea35 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "class": "Drupal\\Console\\Composer\\Plugin\\Extender" }, "require": { - "composer-plugin-api": "^1.0", + "composer-plugin-api": "^1.0 || ^2.0", "composer/installers": "^1.2", "symfony/yaml": "~3.0|^4.4", "symfony/finder": "~3.0|^4.4" diff --git a/src/Extender.php b/src/Extender.php index fb1438c..aacc484 100644 --- a/src/Extender.php +++ b/src/Extender.php @@ -160,4 +160,20 @@ protected function removeCacheFiles($directory) $this->io->write('Cache file can not be deleted'); } } + + /** + * {@inheritdoc} + */ + public function deactivate(Composer $composer, IOInterface $io) + { + // Nothing to deactivate. + } + + /** + * {@inheritdoc} + */ + public function uninstall(Composer $composer, IOInterface $io) + { + // Nothing to uninstall. + } }