/** * @inheritdoc */ public function __construct(array $middleware) { $foundHandler = false; foreach ($middleware as $object) { if ($object instanceof MigrateHandler) { $foundHandler = true; break; } } if (!$foundHandler) { throw new MigrationBusException(sprintf('MigrationBus must have at least one instance of "%s"', MigrateHandler::class)); } parent::__construct($middleware); }
/** * TransactionalCommandBus constructor. * * @param CommandBus $commandBus */ public function __construct(CommandBus $commandBus) { parent::__construct([]); // Build it to prevent warnings but never use it $this->commandBus = $commandBus; $this->reset(); }