diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index a729710c0..2ace251af 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -610,14 +610,14 @@ class Installer } } + if ($this->executeOperations || $this->writeLock) { + $localRepo->write(); + } + $event = 'Composer\Installer\PackageEvents::POST_PACKAGE_'.strtoupper($jobType); if (defined($event) && $this->runScripts) { $this->eventDispatcher->dispatchPackageEvent(constant($event), $this->devMode, $policy, $pool, $installedRepo, $request, $operations, $operation); } - - if ($this->executeOperations || $this->writeLock) { - $localRepo->write(); - } } if ($this->executeOperations) {