This repository was archived by the owner on Jan 28, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed
Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 1515
1616class Composer
1717{
18- public static function hookInstallAcmeDemoBundle (CommandEvent $ event )
18+ public static function hookRootPackageInstall (CommandEvent $ event )
1919 {
20- $ event ->getComposer ()->getEventDispatcher ()->addSubscriber (new InstallAcmeDemoBundleSubscriber ());
20+ $ event ->getComposer ()->getEventDispatcher ()->addSubscriber (new RootPackageInstallSubscriber ());
2121 }
2222}
Original file line number Diff line number Diff line change 1616use Composer \Script \CommandEvent ;
1717use Sensio \Bundle \DistributionBundle \Composer \ScriptHandler ;
1818
19- class InstallAcmeDemoBundleSubscriber implements EventSubscriberInterface
19+ class RootPackageInstallSubscriber implements EventSubscriberInterface
2020{
2121 public static function installAcmeDemoBundle (CommandEvent $ event )
2222 {
2323 ScriptHandler::installAcmeDemoBundle ($ event );
2424 }
2525
26+ public static function setupNewDirectoryStructure (CommandEvent $ event )
27+ {
28+ ScriptHandler::defineDirectoryStructure ($ event );
29+ }
30+
2631 public static function getSubscribedEvents ()
2732 {
28- return array (ScriptEvents::POST_INSTALL_CMD => 'installAcmeDemoBundle ' );
33+ return array (
34+ ScriptEvents::POST_INSTALL_CMD => array (
35+ array ('setupNewDirectoryStructure ' , 512 ),
36+ array ('installAcmeDemoBundle ' , 0 )
37+ ),
38+ );
2939 }
3040}
Original file line number Diff line number Diff line change 2424 },
2525 "scripts" : {
2626 "post-root-package-install" : [
27- " SymfonyStandard\\ Composer::hookInstallAcmeDemoBundle "
27+ " SymfonyStandard\\ Composer::hookRootPackageInstall "
2828 ],
2929 "post-install-cmd" : [
3030 " Incenteev\\ ParameterHandler\\ ScriptHandler::buildParameters" ,
You can’t perform that action at this time.
0 commit comments