Преглед изворни кода

Make sure binaries are recreated before POST-hooks fire

Jordi Boggiano пре 7 година
родитељ
комит
4c4f516ea2
1 измењених фајлова са 6 додато и 6 уклоњено
  1. 6 6
      src/Composer/Installer.php

+ 6 - 6
src/Composer/Installer.php

@@ -301,12 +301,6 @@ class Installer
             $this->autoloadGenerator->dump($this->config, $localRepo, $this->package, $this->installationManager, 'composer', $this->optimizeAutoloader);
         }
 
-        if ($this->runScripts) {
-            // dispatch post event
-            $eventName = $this->update ? ScriptEvents::POST_UPDATE_CMD : ScriptEvents::POST_INSTALL_CMD;
-            $this->eventDispatcher->dispatchScript($eventName, $this->devMode);
-        }
-
         if ($this->executeOperations) {
             // force binaries re-generation in case they are missing
             foreach ($localRepo->getPackages() as $package) {
@@ -321,6 +315,12 @@ class Installer
             }
         }
 
+        if ($this->runScripts) {
+            // dispatch post event
+            $eventName = $this->update ? ScriptEvents::POST_UPDATE_CMD : ScriptEvents::POST_INSTALL_CMD;
+            $this->eventDispatcher->dispatchScript($eventName, $this->devMode);
+        }
+
         // re-enable GC except on HHVM which triggers a warning here
         if (!defined('HHVM_VERSION')) {
             gc_enable();