File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 19
19
final class Cook implements PluginInterface, Capable, EventSubscriberInterface, CommandProvider
20
20
{
21
21
private array $ newPackages = [];
22
- private array $ packagesToRemove = [];
23
22
private ?ServiceContainer $ serviceContainer = null ;
24
23
private Composer $ composer ;
25
24
private IOInterface $ io ;
@@ -74,15 +73,16 @@ public function addNewPackage(PackageEvent $event): void
74
73
75
74
public function removePackage (PackageEvent $ event ): void
76
75
{
77
- $ this -> packagesToRemove [] = $ event ->getOperation ()
76
+ $ package = $ event ->getOperation ()
78
77
->getPackage ()
79
78
->getName ();
79
+
80
+ $ this ->uninstallRecipe ($ package );
80
81
}
81
82
82
83
public function postUpdate (): void
83
84
{
84
85
$ this ->executeRecipes ();
85
- $ this ->uninstallRecipes ();
86
86
$ this ->displayPostInstallOutput ();
87
87
}
88
88
@@ -102,11 +102,11 @@ private function executeRecipes(): void
102
102
?->cookRecipes($ this ->newPackages );
103
103
}
104
104
105
- private function uninstallRecipes ( ): void
105
+ private function uninstallRecipe ( string $ package ): void
106
106
{
107
107
$ this ->getServiceContainer ()
108
108
->get (Oven::class)
109
- ?->uninstallRecipes($ this -> packagesToRemove );
109
+ ?->uninstallRecipes([ $ package ] );
110
110
}
111
111
112
112
private function displayPostInstallOutput (): void
You can’t perform that action at this time.
0 commit comments