Skip to content
Snippets Groups Projects
Verified Commit b676d86b authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3266160 by smustgrave, alex.skrypnyk, tannguyenhn, beatrizrodrigues,...

Issue #3266160 by smustgrave, alex.skrypnyk, tannguyenhn, beatrizrodrigues, joachim, larowlan: Composer Scaffold plugin calls dispatch() instead of dispatchScript()

(cherry picked from commit a61eee36)
parent b4ff0795
No related branches found
No related tags found
7 merge requests!122353526426-warning-for-missing,!11958Issue #3490507 by alexpott, smustgrave: Fix bogus mocking in...,!11769Issue #3517987: Add option to contextual filters to encode slashes in query parameter.,!11185Issue #3477324 by andypost, alexpott: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4,!9944Issue #3483353: Consider making the createCopy config action optionally fail...,!8325Update file Sort.php,!8095Expose document root on install
Pipeline #170407 passed with warnings
Pipeline: drupal

#170414

    ......@@ -143,7 +143,7 @@ public function scaffold() {
    // Call any pre-scaffold scripts that may be defined.
    $dispatcher = $this->composer->getEventDispatcher();
    $dispatcher->dispatch(self::PRE_DRUPAL_SCAFFOLD_CMD);
    $dispatcher->dispatchScript(self::PRE_DRUPAL_SCAFFOLD_CMD);
    // Fetch the list of file mappings from each allowed package and normalize
    // them.
    ......@@ -178,7 +178,7 @@ public function scaffold() {
    $gitIgnoreManager->manageIgnored($scaffold_results, $scaffold_options);
    // Call post-scaffold scripts.
    $dispatcher->dispatch(self::POST_DRUPAL_SCAFFOLD_CMD);
    $dispatcher->dispatchScript(self::POST_DRUPAL_SCAFFOLD_CMD);
    }
    /**
    ......
    ......@@ -4,11 +4,11 @@
    namespace Drupal\Tests\fixture\Composer\Plugin;
    use Composer\EventDispatcher\Event;
    use Composer\EventDispatcher\EventSubscriberInterface;
    use Composer\Plugin\PluginInterface;
    use Composer\Composer;
    use Composer\IO\IOInterface;
    use Composer\Script\Event;
    use Drupal\Composer\Plugin\Scaffold\Handler;
    /**
    ......@@ -30,14 +30,14 @@ public static function getSubscribedEvents(): array {
    * Implements pre Drupal scaffold cmd.
    */
    public static function preDrupalScaffoldCmd(Event $event): void {
    print 'Hello preDrupalScaffoldCmd' . PHP_EOL;
    $event->getIO()->write('Hello preDrupalScaffoldCmd');
    }
    /**
    * Implements post Drupal scaffold cmd.
    */
    public static function postDrupalScaffoldCmd(Event $event): void {
    print 'Hello postDrupalScaffoldCmd' . PHP_EOL;
    $event->getIO()->write('Hello postDrupalScaffoldCmd');
    }
    /**
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment