XdebugDisablingProcessEnvironmentConfigurator
Disables Xdebug for child processes unless coverage still needs it.
Interfaces
Configures subprocess environment variables before queued execution.
Constants
Properties
Methods
Configures Xdebug-related environment variables for nested commands.
Determines whether a command line contains an exact long option.
Determines whether an environment flag is set to a truthy value.
Determines whether the child process command line requests coverage.
Determines whether Xdebug can be disabled for the child process.
private
EnvironmentInterface
$environment
private
ExtensionInterface
$extension
public
__construct(EnvironmentInterface
$environment, ExtensionInterface
$extension) : mixed
Parameters
Description
reads parent process environment variables
Description
checks PHP extension availability
Configures Xdebug-related environment variables for nested commands.
public
configure(Process
$process, OutputInterface
$output) : void
Parameters
$process
:
Process
Description
the queued process that will be started
$output
:
OutputInterface
Description
the parent output used to infer console capabilities
Determines whether a command line contains an exact long option.
private
containsCommandLineArgument(
string
$commandLine,
string
$argument) : bool
Parameters
$commandLine
:
string
Description
the shell-escaped command line
$argument
:
string
Description
the long option to find
Return values
Description
true when the exact option is present
Determines whether an environment flag is set to a truthy value.
private
isTruthyEnvironmentFlag(
string
$name) : bool
Parameters
$name
:
string
Description
the environment variable name
Return values
Description
true when the environment variable is truthy
Determines whether the child process command line requests coverage.
private
requiresCoverage(Process
$process) : bool
Parameters
$process
:
Process
Description
the queued process that will be started
Return values
Description
true when coverage arguments are present
Determines whether Xdebug can be disabled for the child process.
private
shouldDisableXdebug(Process
$process) : bool
Parameters
$process
:
Process
Description
the queued process that will be started
Return values
Description
true when Xdebug should be disabled for the child process