From 6a15370aae8452a3036900e524ed2acee07b7ad2 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Thu, 22 Oct 2020 14:47:29 +1300 Subject: [PATCH] FIX: Add missing methods to plugin interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the original composer2 fix, these were missed. Funnily enough, our test suite didn’t cover even this case so I’ve added a minimal failing test that checks instantiation works. --- src/VendorPlugin.php | 14 ++++++++++++++ tests/VendorPluginTest.php | 17 +++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 tests/VendorPluginTest.php diff --git a/src/VendorPlugin.php b/src/VendorPlugin.php index 438e8e7..0fbd46c 100644 --- a/src/VendorPlugin.php +++ b/src/VendorPlugin.php @@ -248,4 +248,18 @@ protected function installLibrary(IOInterface $IO, Library $library) ); $task->process($IO, [$library]); } + + /** + * Required by the composer 2 plugin interface + */ + public function deactivate(Composer $composer, IOInterface $io) + { + } + + /** + * Required by the composer 2 plugin interface + */ + public function uninstall(Composer $composer, IOInterface $io) + { + } } diff --git a/tests/VendorPluginTest.php b/tests/VendorPluginTest.php new file mode 100644 index 0000000..259b141 --- /dev/null +++ b/tests/VendorPluginTest.php @@ -0,0 +1,17 @@ +