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?