Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Application.php

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\TextUI

Code

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));
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal