feat: Add a info:requirements command #1852
unit-tests.yaml
on: pull_request
Matrix: infection
Matrix: unit-tests
Unit tests status
0s
Annotations
2 errors and 2 warnings
Infection (PHP 8.2)
Process completed with exit code 2.
|
Unit tests status
Process completed with exit code 1.
|
Infection (PHP 8.2):
src/Console/Command/Info/RequirementsCommand.php#L70
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
}
public function execute(IO $io) : int
{
- ChangeWorkingDirOption::changeWorkingDirectory($io);
+
$config = $io->getTypedOption(self::NO_CONFIG_OPTION)->asBoolean() ? Configuration::create(null, new stdClass()) : ConfigOption::getConfig($io, true);
$composerJson = $config->getComposerJson();
$composerLock = $config->getComposerLock();
|
Infection (PHP 8.2):
src/Console/Command/Info/RequirementsCommand.php#L217
Escaped Mutant for Mutator "Coalesce":
--- Original
+++ New
@@ @@
return;
}
$io->writeln('<comment>The following PHP constraints were found:</comment>');
- self::renderTable($io, ['Constraints', 'Source'], array_map(static fn(Requirement $requirement) => [$requirement->condition, $requirement->source ?? 'root'], $requirements));
+ self::renderTable($io, ['Constraints', 'Source'], array_map(static fn(Requirement $requirement) => [$requirement->condition, 'root' ?? $requirement->source], $requirements));
}
/**
* @param Requirement[] $required
|