diff --git a/src/Patches.php b/src/Patches.php index 9bf0838..d434a86 100644 --- a/src/Patches.php +++ b/src/Patches.php @@ -130,7 +130,6 @@ public function checkPatches(Event $event) { } // Remove packages for which the patch set has changed. - $promises = array(); foreach ($packages as $package) { if (!($package instanceof AliasPackage)) { $package_name = $package->getName(); @@ -152,7 +151,8 @@ public function checkPatches(Event $event) { $uninstallOperation ); - $promises[] = $installationManager->uninstall($localRepository, $uninstallOperation); + $uninstallPromise = $installationManager->uninstall($localRepository, $uninstallOperation); + $this->composer->getLoop()->wait([$uninstallPromise]); $this->eventDispatcher->dispatchPackageEvent( PackageEvents::POST_PACKAGE_UNINSTALL, @@ -164,10 +164,6 @@ public function checkPatches(Event $event) { } } } - $promises = array_filter($promises); - if ($promises) { - $this->composer->getLoop()->wait($promises); - } } // If the Locker isn't available, then we don't need to do this. // It's the first time packages have been installed.