Fire pre-update|install-cmd event as early as it should be, refs #2520
parent
8a5d072b87
commit
384ed2822d
|
@ -173,6 +173,12 @@ class Installer
|
||||||
unset($devRepo, $package);
|
unset($devRepo, $package);
|
||||||
// end BC
|
// end BC
|
||||||
|
|
||||||
|
if ($this->runScripts) {
|
||||||
|
// dispatch pre event
|
||||||
|
$eventName = $this->update ? ScriptEvents::PRE_UPDATE_CMD : ScriptEvents::PRE_INSTALL_CMD;
|
||||||
|
$this->eventDispatcher->dispatchCommandEvent($eventName, $this->devMode);
|
||||||
|
}
|
||||||
|
|
||||||
$this->downloadManager->setPreferSource($this->preferSource);
|
$this->downloadManager->setPreferSource($this->preferSource);
|
||||||
$this->downloadManager->setPreferDist($this->preferDist);
|
$this->downloadManager->setPreferDist($this->preferDist);
|
||||||
|
|
||||||
|
@ -199,12 +205,6 @@ class Installer
|
||||||
$aliases = $this->getRootAliases();
|
$aliases = $this->getRootAliases();
|
||||||
$this->aliasPlatformPackages($platformRepo, $aliases);
|
$this->aliasPlatformPackages($platformRepo, $aliases);
|
||||||
|
|
||||||
if ($this->runScripts) {
|
|
||||||
// dispatch pre event
|
|
||||||
$eventName = $this->update ? ScriptEvents::PRE_UPDATE_CMD : ScriptEvents::PRE_INSTALL_CMD;
|
|
||||||
$this->eventDispatcher->dispatchCommandEvent($eventName, $this->devMode);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$this->suggestedPackages = array();
|
$this->suggestedPackages = array();
|
||||||
$res = $this->doInstall($localRepo, $installedRepo, $platformRepo, $aliases, $this->devMode);
|
$res = $this->doInstall($localRepo, $installedRepo, $platformRepo, $aliases, $this->devMode);
|
||||||
|
|
Loading…
Reference in New Issue