magento-hackathon / magento-composer-installer

Composer installer for Magento modules
210 stars 156 forks source link

deploy gets executed after autoload generation #106

Open Flyingmana opened 10 years ago

Flyingmana commented 10 years ago

i noticed the autoload generation currently happens before the deploy, causes problems with composer autoloading for magento files. (anyone used/tried this besides me, or Iam the only one?)

tkdb commented 10 years ago

If you leave a little notice how to test, I can consider to replay with the tests I also have in my TODO for #100 and #99.

davidverholen commented 10 years ago

when you look at the Composer\Installer at line 294...

$this->autoloadGenerator->setDevMode($this->devMode);
$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->dispatchCommandEvent($eventName, $this->devMode);
}

autoload is generated before the deployment because the deploymanager is called in the post install/update event handler