class PreflightVerify (View source)

Helper methods to verify preflight state.

Methods

verify(Environment $environment)

Throw an exception if the environment is not right for running Drush.

confirmPhpVersion(string $minimumPhpVersion)

Fail fast if the php version does not meet the minimum requirements.

confirmUsingCLI(Environment $environment)

Fail if not being run from the command line.

checkPhpIni()

Evaluate the environment before command bootstrapping begins. If the php environment is too restrictive, then notify the user that a setting change is needed and abort.

bool
invalidIniValue(string $ini_value, string|string[] $disallowed_value)

Determine whether an ini value is valid based on the criteria.

loadedPhpIniMessage()

Returns a localizable message about php.ini that varies depending on whether the php_ini_loaded_file() is available or not.

Details

verify(Environment $environment)

Throw an exception if the environment is not right for running Drush.

Parameters

Environment $environment

confirmPhpVersion(string $minimumPhpVersion)

Fail fast if the php version does not meet the minimum requirements.

Parameters

string $minimumPhpVersion The minimum allowable php version

protected confirmUsingCLI(Environment $environment)

Fail if not being run from the command line.

Parameters

Environment $environment

protected checkPhpIni()

Evaluate the environment before command bootstrapping begins. If the php environment is too restrictive, then notify the user that a setting change is needed and abort.

protected bool invalidIniValue(string $ini_value, string|string[] $disallowed_value)

Determine whether an ini value is valid based on the criteria.

Parameters

string $ini_value The value of the ini setting being tested.
string|string[] $disallowed_value The value that the ini seting cannot be, or a list of disallowed values that cannot appear in the setting.

Return Value

bool

protected loadedPhpIniMessage()

Returns a localizable message about php.ini that varies depending on whether the php_ini_loaded_file() is available or not.