Skip to content

Raise PHP to 8.1 + Minor refactoring (#186) #769

Raise PHP to 8.1 + Minor refactoring (#186)

Raise PHP to 8.1 + Minor refactoring (#186) #769

Triggered via push January 30, 2025 07:39
Status Success
Total duration 5m 19s
Artifacts

mutation.yml

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

Annotations

10 warnings
mutation / PHP 8.2-ubuntu-latest: src/Command/InfoCommand.php#L36
Escaped Mutant for Mutator "IntegerNegation": --- Original +++ New @@ @@ $package = $composer->getRepositoryManager()->getLocalRepository()->findPackage($packageName, '*'); if ($package === null) { $io->error('Package "' . $packageName . '" not found.'); - return 1; + return -1; } return $this->vendorPackage($composer, $package, $io); }
mutation / PHP 8.2-ubuntu-latest: src/Command/InfoCommand.php#L112
Escaped Mutant for Mutator "IfNegation": --- Original +++ New @@ @@ } else { $isFirst = true; foreach ($environmentsConfiguration as $environment => $groups) { - if ($isFirst) { + if (!$isFirst) { $isFirst = false; } else { $io->newLine();
mutation / PHP 8.2-ubuntu-latest: src/Command/InfoCommand.php#L121
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ if (empty($groups)) { $io->writeln(' <fg=gray>(empty)</>'); } else { - $io->newLine(); + $this->writeConfiguration($io, $groups, offset: 2, addSeparateLine: false); } }
mutation / PHP 8.2-ubuntu-latest: src/Command/InfoCommand.php#L127
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ } } } - return 0; + return 1; } /** * @psalm-param array<string, string|string[]> $configuration
mutation / PHP 8.2-ubuntu-latest: src/Command/RebuildCommand.php#L29
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ protected function execute(InputInterface $input, OutputInterface $output) : int { new MergePlanProcess($this->requireComposer()); - return 0; + return -1; } }
mutation / PHP 8.2-ubuntu-latest: src/Composer/MergePlanProcess.php#L81
Escaped Mutant for Mutator "Continue_": --- Original +++ New @@ @@ if (Options::containsWildcard($file)) { $matches = glob($absoluteFilePath); if (empty($matches)) { - continue; + break; } foreach ($matches as $match) { $this->mergePlan->add($this->normalizePackageFilePath($package, $match, $isVendorOverrideLayer), $packageName, $group);
mutation / PHP 8.2-ubuntu-latest: src/Composer/MergePlanProcess.php#L96
Escaped Mutant for Mutator "Continue_": --- Original +++ New @@ @@ continue; } if ($isOptional && !is_file($absoluteFilePath)) { - continue; + break; } $this->mergePlan->add($this->normalizePackageFilePath($package, $absoluteFilePath, $isVendorOverrideLayer), $packageName, $group); }
mutation / PHP 8.2-ubuntu-latest: src/Composer/MergePlanProcess.php#L124
Escaped Mutant for Mutator "Continue_": --- Original +++ New @@ @@ { foreach ($this->helper->getEnvironmentConfig() as $environment => $groups) { if ($environment === Options::DEFAULT_ENVIRONMENT) { - continue; + break; } if (empty($groups)) { $this->mergePlan->addEnvironmentWithoutConfigs($environment);
mutation / PHP 8.2-ubuntu-latest: src/Composer/Options.php#L49
Escaped Mutant for Mutator "CastString": --- Original +++ New @@ @@ } $options = $extra['config-plugin-options']; if (!empty($options['merge-plan-file'])) { - $this->mergePlanFile = (string) $options['merge-plan-file']; + $this->mergePlanFile = $options['merge-plan-file']; } if (isset($options['build-merge-plan'])) { $this->buildMergePlan = (bool) $options['build-merge-plan'];
mutation / PHP 8.2-ubuntu-latest: src/Config.php#L163
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ $scopeRequire = static function () : array { /** @psalm-suppress InvalidArgument, MissingClosureParamType */ set_error_handler(static function (int $errorNumber, string $errorString, string $errorFile, int $errorLine) { - throw new ErrorException($errorString, $errorNumber, 0, $errorFile, $errorLine); + throw new ErrorException($errorString, $errorNumber, -1, $errorFile, $errorLine); }); /** @psalm-suppress MixedArgument */ extract(func_get_arg(1), EXTR_SKIP);