Our application object
Defines the interface for a Boot classes. Any CMS that wishes to work with Drush should extend BaseBoot. If the CMS has a Drupal-Compatibility layer, then it should extend DrupalBoot.
The BootstrapHook is installed as an init hook that runs before all commands. If there is a @bootstrap annotation, then we will bootstrap Drupal to the requested phase.
This is a do-nothing 'Boot' class that is used when there is no site at --root, or when no root is specified.
Defines the available kernels that can be bootstrapped.
CacheInterface deprecated
Interface for cache implementations.
Command cache implementation.
FileCache deprecated
Default cache implementation.
JSONCache deprecated
JSON cache storage backend.
Create a placeholder proxy command to represent an unknown command.
Keep a list of all of the service commands that we can find when the Drupal Kernel is booted.
Non-service based wrapper for the service based config:import command.
Topic commands.
Class XhprofCommands
Drush generate command.
Implements drush-alias-file command.
Implements drush-command-file command.
Implements generate migration command.
Generators input handler.
Output printer form generators.
Format an array into CLI help string.
Check Drupal Composer packages for security updates.
Locate Drush configuration files and load them into the configuration instance.
Accessors for common Drush config keys.
Store information about the environment
Load configuration files, and fill in any property values that need to be expanded.
This class is a good example of a sql-sanitize plugin.
Implement this interface when building a Drush sql-sanitize plugin.
This class is a good example of how to build a sql-sanitize plugin.
This class is a good example of how to build a sql-sanitize plugin.
A sql-sanitize plugin.
Overridden version of DrupalKernel adapted to the needs of Drush.
Common functionality for overridden kernels.
This compiler pass is added to Drupal's ContainerBuilder by our own subclass of DrupalKernel. Our DrupalKernel subclass knows which compiler passes to add because they are registered to it via its 'alter()' method. This happens in DrupalBoot8 immediately after the DrupalKernel object is created.
Overridden version of InstallerKernel adapted to the needs of Drush.
Overridden version of UpdateKernel adapted to the needs of Drush.
Static Service Container wrapper.
Throw an exception indicating that the user cancelled the operation.
Our own output formatter
Escaper encapsulates escaping rules for single and double-quoted YAML strings.
Exception interface for all exceptions thrown by the component.
Exception class thrown when an error occurs during parsing.
Exception class thrown when an error occurs during parsing.
Inline implements a YAML parser/dumper for the YAML inline syntax.
Parser parses YAML strings to convert them to PHP arrays.
Unescaper encapsulates unescaping rules for single and double-quoted YAML strings.
Yaml offers convenience methods to load and dump YAML.
Redirects Drupal logging messages to Drush log.
Additional log levels that Drush uses for historical reasons.
Preprocess commandline arguments.
Map commandline arguments from one value to another during preflight.
Prepare to bootstrap Drupal
The Drush preflight determines what needs to be done for this request.
Storage for arguments preprocessed during preflight.
Storage for arguments preprocessed during preflight.
Helper methods to verify preflight state.
RedispatchToSiteLocal forces an exec to the site-local Drush if it exist. We must do this super-early, before loading Drupal's autoload file. If we do not, we will crash unless the site-local Drush and the global Drush are using the exact same versions of all dependencies, which will rarely line up sufficiently to prevent problems.
Caster class for VarDumper casters for the shell.
Main Drush command.
Help command.
Prepare our Dependency Injection Container
Log PHP errors to the Drush log. This is in effect until Drupal's error handler takes over.
HandlerInterface represents a PHP system handler (e.g. the error reporting handler, the shutdown handler) that may be globally installed.
The RedispatchHook is installed as an init hook that runs before all commands. If the commandline contains an alias or a site specification that points at a remote machine, then we will stop execution of the current command and instead run the command remotely.
Control the Drush runtime environment
Drush's shutdown handler
The TildeExpansionHook is installed as a preValidate hook that runs before all commands. Argument or option values containing a leading tilde will be expanded to an absolute path.
A host path is a path on some machine. The machine may be specified by a label, and the label may be an @alias or a site specification.
Find all legacy alias files and convert them to an equivalent '.yml' file.
The Drush ProcessManager adds a few Drush-specific service methods.
Discover alias files:
Inflection interface for the site alias manager.
Inflection trait for the site alias manager.
Parse a string that contains a site alias name, and provide convenience methods to access the parts.
Parse a string that contains a site specification.
Note: when using this trait, also implement ConfigAwareInterface/ConfigAwareTrait.
BufferedConsoleOutput supports separation of the stdout and stderr streams.
ArgvInput represents an input coming from the CLI arguments.
This is an InputDefinition that allows any option to be considered valid.
UnvalidatedArgvInput is an ArgvInput that never reports errors when extra options are provided.
CliTestTrait provides an execute() method that is useful for launching executable programs in functional tests.
DrushTestTrait provides a drush() method that may be used to write functional tests for Drush extensions.
OutputUtilsTrait provides some useful utility methods for test classes that define getOutputRaw() and getErrorOutputRaw() methods.