From aa6adb847eb8da678136017bf4c44c8da2b7c78b Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Tue, 9 Apr 2024 08:27:02 +0100 Subject: [PATCH] Issue #3438034 by tannguyenhn, adwivedi008, alex.skrypnyk, alexpott: Fix Composer Scaffold plugin event listeners --- Handler.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Handler.php b/Handler.php index 3e51f909a33..a3e9914bb39 100644 --- a/Handler.php +++ b/Handler.php @@ -3,7 +3,6 @@ namespace Drupal\Composer\Plugin\Scaffold; use Composer\Composer; -use Composer\EventDispatcher\EventDispatcher; use Composer\Installer\PackageEvent; use Composer\IO\IOInterface; use Composer\Package\PackageInterface; @@ -143,7 +142,7 @@ public function scaffold() { } // Call any pre-scaffold scripts that may be defined. - $dispatcher = new EventDispatcher($this->composer, $this->io); + $dispatcher = $this->composer->getEventDispatcher(); $dispatcher->dispatch(self::PRE_DRUPAL_SCAFFOLD_CMD); // Fetch the list of file mappings from each allowed package and normalize