Skip to content

Add command bus, Drop PHP 8.1 #1061

Add command bus, Drop PHP 8.1

Add command bus, Drop PHP 8.1 #1061

Triggered via pull request January 2, 2025 12:39
Status Failure
Total duration 29s
Artifacts

mutation-tests-diff.yml

on: pull_request
Matrix: Mutation tests on diff
Fit to window
Zoom out
Zoom in

Annotations

1 error and 5 warnings
Mutation tests on diff (locked, 8.3, ubuntu-latest)
Process completed with exit code 1.
Mutation tests on diff (locked, 8.3, ubuntu-latest)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Mutation tests on diff (locked, 8.3, ubuntu-latest): src/CommandBus/AggregateHandlerProvider.php#L61
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ $this->handlers[$handler->commandClass][] = new HandlerDescriptor($this->handlerFactory->updateHandler($aggregateClass, $handler->method)); } } - $this->initialized = true; + $this->initialized = false; } }
Mutation tests on diff (locked, 8.3, ubuntu-latest): src/CommandBus/DefaultCommandBus.php#L49
Escaped Mutant for Mutator "UnwrapFinally": --- Original +++ New @@ @@ $this->logger?->debug('CommandBus: Is already processing, dont start new processing.'); return; } - try { - $this->processing = true; - $this->logger?->debug('CommandBus: Start processing queue.'); - while ($command = array_shift($this->queue)) { - $handlers = $this->handlerProvider->handlerForCommand($command::class); - if (!is_array($handlers)) { - $handlers = iterator_to_array($handlers); - } - $count = count($handlers); - if ($count === 0) { - throw new HandlerNotFound($command::class); - } - if ($count > 1) { - throw new MultipleHandlersFound($command::class); - } - $handlers[0]->callable()($command); + $this->processing = true; + $this->logger?->debug('CommandBus: Start processing queue.'); + while ($command = array_shift($this->queue)) { + $handlers = $this->handlerProvider->handlerForCommand($command::class); + if (!is_array($handlers)) { + $handlers = iterator_to_array($handlers); } - } finally { - $this->processing = false; - $this->logger?->debug('CommandBus: Finished processing queue.'); + $count = count($handlers); + if ($count === 0) { + throw new HandlerNotFound($command::class); + } + if ($count > 1) { + throw new MultipleHandlersFound($command::class); + } + $handlers[0]->callable()($command); } + $this->processing = false; + $this->logger?->debug('CommandBus: Finished processing queue.'); } public static function createForAggregateHandlers(AggregateRootRegistry $aggregateRootRegistry, RepositoryManager $repositoryManager, ContainerInterface|null $container = null, LoggerInterface|null $logger = null) : self {
Mutation tests on diff (locked, 8.3, ubuntu-latest): src/CommandBus/DefaultCommandBus.php#L50
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ return; } try { - $this->processing = true; + $this->processing = false; $this->logger?->debug('CommandBus: Start processing queue.'); while ($command = array_shift($this->queue)) { $handlers = $this->handlerProvider->handlerForCommand($command::class);
Mutation tests on diff (locked, 8.3, ubuntu-latest): src/CommandBus/DefaultCommandBus.php#L74
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ $handlers[0]->callable()($command); } } finally { - $this->processing = false; + $this->processing = true; $this->logger?->debug('CommandBus: Finished processing queue.'); } }