Skip to content

Update dependency phpstan/phpstan to v2 #1049

Update dependency phpstan/phpstan to v2

Update dependency phpstan/phpstan to v2 #1049

Triggered via pull request January 9, 2025 07:02
Status Success
Total duration 2m 18s
Artifacts

mutation-tests.yml

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

Annotations

11 warnings
Mutation tests (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 (locked, 8.3, ubuntu-latest): src/Bytes.php#L33
Escaped Mutant for Mutator "PregMatchRemoveDollar": --- Original +++ New @@ @@ } public static function parseFromString(string $string) : self { - if (!preg_match('/^([0-9]+)([a-z]+)?$/i', $string, $matches)) { + if (!preg_match('/^([0-9]+)([a-z]+)?/i', $string, $matches)) { throw new InvalidFormat($string); } $number = (int) $matches[1];
Mutation tests (locked, 8.3, ubuntu-latest): src/Bytes.php#L37
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ if (!preg_match('/^([0-9]+)([a-z]+)?$/i', $string, $matches)) { throw new InvalidFormat($string); } - $number = (int) $matches[1]; + $number = (int) $matches[0]; $unit = strtoupper($matches[2] ?? 'B'); if (!array_key_exists($unit, self::SIZES)) { throw new InvalidFormat($string);
Mutation tests (locked, 8.3, ubuntu-latest): src/InvalidFormat.php#L15
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ { public function __construct(string $message) { - parent::__construct(sprintf('Invalid byte format received (got: "%s"). The format must consist of a number and a unit. The following units are allowed: B, KB, MB, GB', $message)); + } }
Mutation tests (locked, 8.3, ubuntu-latest): src/Listener/StopWorkerOnIterationLimitListener.php#L40
Escaped Mutant for Mutator "ArrayItem": --- Original +++ New @@ @@ return; } $event->worker->stop(); - $this->logger?->info('Worker stopped due to maximum iteration of {count}', ['count' => $this->maximumNumberOfIteration]); + $this->logger?->info('Worker stopped due to maximum iteration of {count}', ['count' > $this->maximumNumberOfIteration]); } /** @return array<class-string, string> */ public static function getSubscribedEvents() : array
Mutation tests (locked, 8.3, ubuntu-latest): src/Listener/StopWorkerOnIterationLimitListener.php#L40
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ return; } $event->worker->stop(); - $this->logger?->info('Worker stopped due to maximum iteration of {count}', ['count' => $this->maximumNumberOfIteration]); + $this->logger?->info('Worker stopped due to maximum iteration of {count}', []); } /** @return array<class-string, string> */ public static function getSubscribedEvents() : array
Mutation tests (locked, 8.3, ubuntu-latest): src/Listener/StopWorkerOnMemoryLimitListener.php#L26
Escaped Mutant for Mutator "LessThanOrEqualTo": --- Original +++ New @@ @@ public function onWorkerRunning(WorkerRunningEvent $event) : void { $usedMemory = $this->usedMemory(); - if ($usedMemory->value() <= $this->memoryLimit->value()) { + if ($usedMemory->value() < $this->memoryLimit->value()) { return; } $this->logger?->info('Worker stopped due to memory limit of {limit} bytes exceeded ({memory} bytes used)', ['limit' => $this->memoryLimit->formatted(), 'memory' => $usedMemory->formatted()]);
Mutation tests (locked, 8.3, ubuntu-latest): src/Listener/StopWorkerOnMemoryLimitListener.php#L32
Escaped Mutant for Mutator "ArrayItem": --- Original +++ New @@ @@ if ($usedMemory->value() <= $this->memoryLimit->value()) { return; } - $this->logger?->info('Worker stopped due to memory limit of {limit} bytes exceeded ({memory} bytes used)', ['limit' => $this->memoryLimit->formatted(), 'memory' => $usedMemory->formatted()]); + $this->logger?->info('Worker stopped due to memory limit of {limit} bytes exceeded ({memory} bytes used)', ['limit' > $this->memoryLimit->formatted(), 'memory' => $usedMemory->formatted()]); $event->worker->stop(); } private function usedMemory() : Bytes
Mutation tests (locked, 8.3, ubuntu-latest): src/Listener/StopWorkerOnMemoryLimitListener.php#L32
Escaped Mutant for Mutator "ArrayItem": --- Original +++ New @@ @@ if ($usedMemory->value() <= $this->memoryLimit->value()) { return; } - $this->logger?->info('Worker stopped due to memory limit of {limit} bytes exceeded ({memory} bytes used)', ['limit' => $this->memoryLimit->formatted(), 'memory' => $usedMemory->formatted()]); + $this->logger?->info('Worker stopped due to memory limit of {limit} bytes exceeded ({memory} bytes used)', ['limit' => $this->memoryLimit->formatted(), 'memory' > $usedMemory->formatted()]); $event->worker->stop(); } private function usedMemory() : Bytes
Mutation tests (locked, 8.3, ubuntu-latest): src/Listener/StopWorkerOnMemoryLimitListener.php#L32
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ if ($usedMemory->value() <= $this->memoryLimit->value()) { return; } - $this->logger?->info('Worker stopped due to memory limit of {limit} bytes exceeded ({memory} bytes used)', ['limit' => $this->memoryLimit->formatted(), 'memory' => $usedMemory->formatted()]); + $this->logger?->info('Worker stopped due to memory limit of {limit} bytes exceeded ({memory} bytes used)', ['memory' => $usedMemory->formatted()]); $event->worker->stop(); } private function usedMemory() : Bytes
Mutation tests (locked, 8.3, ubuntu-latest): src/Listener/StopWorkerOnTimeLimitListener.php#L32
Escaped Mutant for Mutator "GreaterThanOrEqualTo": --- Original +++ New @@ @@ } public function onWorkerRunning(WorkerRunningEvent $event) : void { - if ($this->endTime >= time()) { + if ($this->endTime > time()) { return; } $event->worker->stop();