浏览代码

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);
             $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) {
         if ($this->executeOperations) {
             // force binaries re-generation in case they are missing
             // force binaries re-generation in case they are missing
             foreach ($localRepo->getPackages() as $package) {
             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
         // re-enable GC except on HHVM which triggers a warning here
         if (!defined('HHVM_VERSION')) {
         if (!defined('HHVM_VERSION')) {
             gc_enable();
             gc_enable();