function Application::executeCommandsThatOnlyRequireCliConfiguration
1 call to Application::executeCommandsThatOnlyRequireCliConfiguration()
- Application::run in vendor/
phpunit/ phpunit/ src/ TextUI/ Application.php
File
-
vendor/
phpunit/ phpunit/ src/ TextUI/ Application.php, line 434
Class
- Application
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\TextUICode
private function executeCommandsThatOnlyRequireCliConfiguration(CliConfiguration $cliConfiguration, false|string $configurationFile) : void {
if ($cliConfiguration->generateConfiguration()) {
$this->execute(new GenerateConfigurationCommand());
}
if ($cliConfiguration->migrateConfiguration()) {
if ($configurationFile === false) {
$this->exitWithErrorMessage('No configuration file found to migrate');
}
$this->execute(new MigrateConfigurationCommand(realpath($configurationFile)));
}
if ($cliConfiguration->hasAtLeastVersion()) {
$this->execute(new AtLeastVersionCommand($cliConfiguration->atLeastVersion()));
}
if ($cliConfiguration->version()) {
$this->execute(new ShowVersionCommand());
}
if ($cliConfiguration->checkVersion()) {
$this->execute(new VersionCheckCommand(new PhpDownloader(), Version::majorVersionNumber(), Version::id()));
}
if ($cliConfiguration->help()) {
$this->execute(new ShowHelpCommand(Result::SUCCESS));
}
}