1
0
Fork 0

updated events to use composer from Factory

PSR-0 autoloading is now handled correctly
pull/1962/head
Tobias Munk 2013-06-03 16:37:45 +02:00
parent 27b3f338e9
commit c1cae8d838
1 changed files with 6 additions and 7 deletions

View File

@ -143,14 +143,15 @@ EOT
$installedFromVcs = false;
}
$composer = Factory::create($io);
if ($noScripts === false) {
// dispatch event
$this->getComposer()->getEventDispatcher()->dispatchCommandEvent(ScriptEvents::POST_ROOT_PACKAGE_INSTALL, $installDevPackages);
$composer->getEventDispatcher()->dispatchCommandEvent(ScriptEvents::POST_ROOT_PACKAGE_INSTALL, $installDevPackages);
}
// install dependencies of the created project
$composer = Factory::create($io);
$installer = Installer::create($io, $composer);
// install dependencies of the created project
$installer = Installer::create($io, $composer);
$installer->setPreferSource($preferSource)
->setPreferDist($preferDist)
->setDevMode($installDevPackages)
@ -207,10 +208,8 @@ EOT
}
if ($noScripts === false) {
// TODO: improve autoloader refreshing
require($this->getComposer()->getConfig()->get('vendor-dir').'/autoload.php');
// dispatch event
$this->getComposer()->getEventDispatcher()->dispatchCommandEvent(ScriptEvents::POST_CREATE_PROJECT_CMD, $installDevPackages);
$composer->getEventDispatcher()->dispatchCommandEvent(ScriptEvents::POST_CREATE_PROJECT_CMD, $installDevPackages);
}
return 0;