Skip to content

PHP 8.4 (#156)

PHP 8.4 (#156) #625

Triggered via push January 15, 2025 05:50
Status Success
Total duration 1m 54s
Artifacts

mutation.yml

on: push
Matrix: mutation / infection
Fit to window
Zoom out
Zoom in

Annotations

11 warnings
mutation / PHP 8.4-ubuntu-latest
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
mutation / PHP 8.4-ubuntu-latest: src/AssetConverter.php#L82
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ * * @psalm-param array<string, array{0:string,1:string}> $commands */ - public function __construct(private readonly Aliases $aliases, private readonly LoggerInterface $logger, array $commands = [], private bool $forceConvert = false) + public function __construct(private readonly Aliases $aliases, private readonly LoggerInterface $logger, array $commands = [], private bool $forceConvert = true) { $this->commands = array_merge($this->commands, $commands); }
mutation / PHP 8.4-ubuntu-latest: src/AssetConverter.php#L84
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ */ public function __construct(private readonly Aliases $aliases, private readonly LoggerInterface $logger, array $commands = [], private bool $forceConvert = false) { - $this->commands = array_merge($this->commands, $commands); + $this->commands = $this->commands; } public function convert(string $asset, string $basePath, array $optionsConverter = []) : string {
mutation / PHP 8.4-ubuntu-latest: src/AssetConverter.php#L84
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ */ public function __construct(private readonly Aliases $aliases, private readonly LoggerInterface $logger, array $commands = [], private bool $forceConvert = false) { - $this->commands = array_merge($this->commands, $commands); + $this->commands = $commands; } public function convert(string $asset, string $basePath, array $optionsConverter = []) : string {
mutation / PHP 8.4-ubuntu-latest: src/AssetConverter.php#L91
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ public function convert(string $asset, string $basePath, array $optionsConverter = []) : string { $pos = strrpos($asset, '.'); - if ($pos !== false) { + if ($pos !== true) { $srcExt = substr($asset, $pos + 1); $commandOptions = $this->buildConverterOptions($srcExt, $optionsConverter); if (isset($this->commands[$srcExt])) {
mutation / PHP 8.4-ubuntu-latest: src/AssetConverter.php#L256
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ { $basePath = $this->aliases->get($basePath); $command = $this->aliases->get($command); - $command = strtr($command, ['{options}' => $options, '{from}' => escapeshellarg("{$basePath}/{$asset}"), '{to}' => escapeshellarg("{$basePath}/{$result}")]); + $command = strtr($command, ['{from}' => escapeshellarg("{$basePath}/{$asset}"), '{to}' => escapeshellarg("{$basePath}/{$result}")]); $descriptors = [1 => ['pipe', 'w'], 2 => ['pipe', 'w']]; $pipes = []; $proc = proc_open($command, $descriptors, $pipes, $basePath);
mutation / PHP 8.4-ubuntu-latest: src/AssetConverter.php#L275
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ * @var resource $proc * @var resource[] $pipes */ - $stdout = stream_get_contents($pipes[1]); + $stdout = stream_get_contents($pipes[2]); $stderr = stream_get_contents($pipes[2]); foreach ($pipes as $pipe) { fclose($pipe);
mutation / PHP 8.4-ubuntu-latest: src/AssetConverter.php#L277
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ * @var resource[] $pipes */ $stdout = stream_get_contents($pipes[1]); - $stderr = stream_get_contents($pipes[2]); + $stderr = stream_get_contents($pipes[1]); foreach ($pipes as $pipe) { fclose($pipe); }
mutation / PHP 8.4-ubuntu-latest: src/AssetConverter.php#L285
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ fclose($pipe); } $status = proc_close($proc); - if ($status === 0) { + if ($status === -1) { $this->logger->debug("Converted {$asset} into {$result}:\nSTDOUT:\n{$stdout}\nSTDERR:\n{$stderr}", [__METHOD__]); } else { $this->logger->error("AssetConverter command '{$command}' failed with exit code {$status}:\nSTDOUT:\n{$stdout}\nSTDERR:\n{$stderr}", [__METHOD__]);
mutation / PHP 8.4-ubuntu-latest: src/AssetConverter.php#L285
Escaped Mutant for Mutator "Identical": --- Original +++ New @@ @@ fclose($pipe); } $status = proc_close($proc); - if ($status === 0) { + if ($status !== 0) { $this->logger->debug("Converted {$asset} into {$result}:\nSTDOUT:\n{$stdout}\nSTDERR:\n{$stderr}", [__METHOD__]); } else { $this->logger->error("AssetConverter command '{$command}' failed with exit code {$status}:\nSTDOUT:\n{$stdout}\nSTDERR:\n{$stderr}", [__METHOD__]);
mutation / PHP 8.4-ubuntu-latest: src/AssetConverter.php#L286
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ } $status = proc_close($proc); if ($status === 0) { - $this->logger->debug("Converted {$asset} into {$result}:\nSTDOUT:\n{$stdout}\nSTDERR:\n{$stderr}", [__METHOD__]); + } else { $this->logger->error("AssetConverter command '{$command}' failed with exit code {$status}:\nSTDOUT:\n{$stdout}\nSTDERR:\n{$stderr}", [__METHOD__]); }