Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to access composer in post-drupal-scaffold-cmd method? #68

Open
ric-donaldp opened this issue Aug 3, 2017 · 0 comments
Open

How to access composer in post-drupal-scaffold-cmd method? #68

ric-donaldp opened this issue Aug 3, 2017 · 0 comments

Comments

@ric-donaldp
Copy link

Hi
I've inherited some code which provides a ScriptHandler.php class which implements static methods to process the composer post_install_cmd: and post_update_cmd: These methods get passed an instance of Composer\Script\Event which can be used to get the instance of composer and IO.
They use $extra = $event->getComposer()->getPackage()->getExtra(); to get some parameters they use in processing.
I now would like to do the same with post-drupal-scaffold-cmd: but although my new command is getting called OK, the passed parameter appears to be an instance of Composer\EventDispatcher\Event rather than Composer\ScriptHander\Event. Can this method get access to composer and therfore extras in a similar way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant