From 17ec4c17b0b56636d51abbae7a65e115581bb0fe Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 28 Nov 2017 16:04:50 +0100 Subject: [PATCH] Set COMPOSER_DEV_MODE for all events and not just POST hooks --- src/Composer/Installer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index 55ec51baf..576133164 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -194,6 +194,9 @@ class Installer } if ($this->runScripts) { + $devMode = (int) $this->devMode; + putenv("COMPOSER_DEV_MODE=$devMode"); + // dispatch pre event $eventName = $this->update ? ScriptEvents::PRE_UPDATE_CMD : ScriptEvents::PRE_INSTALL_CMD; $this->eventDispatcher->dispatchScript($eventName, $this->devMode); @@ -299,9 +302,6 @@ class Installer } if ($this->runScripts) { - $devMode = (int) $this->devMode; - putenv("COMPOSER_DEV_MODE=$devMode"); - // dispatch post event $eventName = $this->update ? ScriptEvents::POST_UPDATE_CMD : ScriptEvents::POST_INSTALL_CMD; $this->eventDispatcher->dispatchScript($eventName, $this->devMode);