diff --git a/src/Framework/Bootstrap/SetupCombinator.php b/src/Framework/Bootstrap/SetupCombinator.php index 66b28e81..b31bcac6 100644 --- a/src/Framework/Bootstrap/SetupCombinator.php +++ b/src/Framework/Bootstrap/SetupCombinator.php @@ -5,7 +5,6 @@ namespace Gacela\Framework\Bootstrap; use Gacela\Framework\Event\Dispatcher\ConfigurableEventDispatcher; -use Gacela\Framework\Event\Dispatcher\NullEventDispatcher; /** * @psalm-suppress MixedArgumentTypeCoercion @@ -88,7 +87,7 @@ private function combineEventDispatcher(SetupGacela $other): void } } } else { - $eventDispatcher = new NullEventDispatcher(); + $eventDispatcher = $this->original->getEventDispatcher(); } $this->original->setEventDispatcher($eventDispatcher); } diff --git a/tests/Integration/Framework/DocBlockResolver/DocBlockResolverCacheTest.php b/tests/Integration/Framework/DocBlockResolver/DocBlockResolverCacheTest.php index 06a0862f..16d11339 100644 --- a/tests/Integration/Framework/DocBlockResolver/DocBlockResolverCacheTest.php +++ b/tests/Integration/Framework/DocBlockResolver/DocBlockResolverCacheTest.php @@ -60,9 +60,8 @@ public function test_with_project_cached_enabled(): void { Config::getInstance() ->getSetupGacela() - ->combine(SetupGacela::fromCallable(function (GacelaConfig $config): void { + ->combine(SetupGacela::fromCallable(static function (GacelaConfig $config): void { $config->enableFileCache(); - $config->registerGenericListener([$this, 'saveInMemoryEvent']); })); DocBlockResolverCache::getCacheInstance();