command bus #1030
Annotations
1 error and 5 warnings
Infection
Process completed with exit code 1.
|
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Infection:
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;
}
}
|
Infection:
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
{
|
Infection:
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);
|
Infection:
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.');
}
}
|
Loading