From 28a7b11dd4654382dfd1ac3f8d0871a5df74c147 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sun, 1 Nov 2020 21:44:03 +0100 Subject: [PATCH] Update --- src/Composer/Plugin.php | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/Composer/Plugin.php b/src/Composer/Plugin.php index eab1f4d..e80f036 100644 --- a/src/Composer/Plugin.php +++ b/src/Composer/Plugin.php @@ -37,6 +37,32 @@ class Plugin implements PluginInterface, EventSubscriberInterface $this->io = $io; } + /** + * Remove any hooks from Composer. + * + * This will be called when a plugin is deactivated before being + * uninstalled, but also before it gets upgraded to a new version + * so the old one can be deactivated and the new one activated. + * + * @param Composer $composer + * @param IOInterface $io + */ + public function deactivate(Composer $composer, IOInterface $io) + { + } + + /** + * Prepare the plugin to be uninstalled. + * + * This will be called after deactivate. + * + * @param Composer $composer + * @param IOInterface $io + */ + public function uninstall(Composer $composer, IOInterface $io) + { + } + /** * {@inheritdoc} */ @@ -52,7 +78,7 @@ class Plugin implements PluginInterface, EventSubscriberInterface public function onInstall(PackageEvent $event): void { - var_dumP($event); + \var_dumP($event); } /**