Skip to content

Update UPGRADE.md

Update UPGRADE.md #857

Triggered via pull request May 25, 2024 13:20
Status Success
Total duration 1m 32s
Artifacts

mutation.yml

on: pull_request
Matrix: mutation / roave-infection
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
mutation / PHP 8.3-ubuntu-latest: src/Command/RunCommand.php#L25
Escaped Mutant for Mutator "PublicVisibility": --- Original +++ New @@ @@ { parent::__construct(); } - public function configure() : void + protected function configure() : void { $this->addArgument('channel', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'Queue channel name list to connect to.', $this->channels)->addOption('maximum', 'm', InputOption::VALUE_REQUIRED, 'Maximum number of messages to process in each channel. Default is 0 (no limits).', 0)->addUsage('[channel1 [channel2 [...]]] --maximum 100'); }
mutation / PHP 8.3-ubuntu-latest: src/Command/RunCommand.php#L38
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ } public function configure() : void { - $this->addArgument('channel', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'Queue channel name list to connect to.', $this->channels)->addOption('maximum', 'm', InputOption::VALUE_REQUIRED, 'Maximum number of messages to process in each channel. Default is 0 (no limits).', 0)->addUsage('[channel1 [channel2 [...]]] --maximum 100'); + $this->addArgument('channel', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'Queue channel name list to connect to.', $this->channels)->addOption('maximum', 'm', InputOption::VALUE_REQUIRED, 'Maximum number of messages to process in each channel. Default is 0 (no limits).', -1)->addUsage('[channel1 [channel2 [...]]] --maximum 100'); } protected function execute(InputInterface $input, OutputInterface $output) : int {
mutation / PHP 8.3-ubuntu-latest: src/Command/RunCommand.php#L38
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ } public function configure() : void { - $this->addArgument('channel', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'Queue channel name list to connect to.', $this->channels)->addOption('maximum', 'm', InputOption::VALUE_REQUIRED, 'Maximum number of messages to process in each channel. Default is 0 (no limits).', 0)->addUsage('[channel1 [channel2 [...]]] --maximum 100'); + $this->addArgument('channel', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'Queue channel name list to connect to.', $this->channels)->addOption('maximum', 'm', InputOption::VALUE_REQUIRED, 'Maximum number of messages to process in each channel. Default is 0 (no limits).', 1)->addUsage('[channel1 [channel2 [...]]] --maximum 100'); } protected function execute(InputInterface $input, OutputInterface $output) : int {
mutation / PHP 8.3-ubuntu-latest: src/Command/RunCommand.php#L47
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ { /** @var string $channel */ foreach ($input->getArgument('channel') as $channel) { - $output->write("Processing channel {$channel}... "); + $count = $this->queueFactory->get($channel)->run((int) $input->getOption('maximum')); $output->writeln("Messages processed: {$count}."); }
mutation / PHP 8.3-ubuntu-latest: src/Command/RunCommand.php#L52
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ foreach ($input->getArgument('channel') as $channel) { $output->write("Processing channel {$channel}... "); $count = $this->queueFactory->get($channel)->run((int) $input->getOption('maximum')); - $output->writeln("Messages processed: {$count}."); + } return 0; } }
mutation / PHP 8.3-ubuntu-latest: src/Debug/QueueDecorator.php#L24
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ public function status(string|int $id) : JobStatus { $result = $this->queue->status($id); - $this->collector->collectStatus($id, $result); + return $result; } public function push(MessageInterface $message, string|array|callable|MiddlewarePushInterface ...$middlewareDefinitions) : MessageInterface
mutation / PHP 8.3-ubuntu-latest: src/Debug/QueueDecorator.php#L34
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ public function push(MessageInterface $message, string|array|callable|MiddlewarePushInterface ...$middlewareDefinitions) : MessageInterface { $message = $this->queue->push($message, ...$middlewareDefinitions); - $this->collector->collectPush($this->queue->getChannelName(), $message, ...$middlewareDefinitions); + return $message; } public function run(int $max = 0) : int
mutation / PHP 8.3-ubuntu-latest: src/Debug/QueueDecorator.php#L38
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ $this->collector->collectPush($this->queue->getChannelName(), $message, ...$middlewareDefinitions); return $message; } - public function run(int $max = 0) : int + public function run(int $max = -1) : int { return $this->queue->run($max); }
mutation / PHP 8.3-ubuntu-latest: src/Debug/QueueDecorator.php#L38
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ $this->collector->collectPush($this->queue->getChannelName(), $message, ...$middlewareDefinitions); return $message; } - public function run(int $max = 0) : int + public function run(int $max = 1) : int { return $this->queue->run($max); }
mutation / PHP 8.3-ubuntu-latest: src/Exception/AdapterConfiguration/ChannelIncorrectlyConfigured.php#L23
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ * @param mixed|object $definition * @param Throwable|null $previous */ - public function __construct(string $channel, $definition, int $code = 0, ?Throwable $previous = null) + public function __construct(string $channel, $definition, int $code = -1, ?Throwable $previous = null) { $adapterClass = AdapterInterface::class; $realType = get_debug_type($definition);