Skip to content

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

@ric-donaldp

Description

@ric-donaldp

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions