Our application object

Mark commands as obsolete. These commands are omitted from help list and when user tries to run one, the command's description is shown. Example usage at https://github.com/drush-ops/drush/blob/13.x/src/Commands/LegacyCommands.php

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/attribute, then we will bootstrap Drupal to the requested phase.

A value class with bootstrap levels.

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.

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.

A copy of \Drupal\Core\DependencyInjection\AutowireTrait with first params' type hint changed.

Topic commands.

Supports profiling Drush commands using either XHProf or Tideways XHProf.

Format an array into CLI help string.

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.

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.

A replacement for DrupalFinder. We may go back to that once it uses InstalledVersions from Composer.

Overridden version of DrupalKernel adapted to the needs of Drush.

Common functionality for overridden kernels.

Overridden version of InstallerKernel adapted to the needs of Drush.

Defines the row preparation event for the migration system.

Filters the ID map by a source and/or a destination ID list.

Print message in drush from migrate message.

Missing source rows event.

Wraps a prepare-row event for event listeners.

Utility methods.

Overridden version of UpdateKernel adapted to the needs of Drush.

Static Service Container wrapper.

Throw an exception indicating that the command was unable to continue.

Throw an exception indicating that the user cancelled the operation.

Our own output formatter

Simplify a EntityInterface to an array.

Redirects Drupal logging messages to Drush log.

Contains \Drush\Log\Logger.

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.

Caster class for VarDumper casters for the shell.

DrushCommand is a PsySH proxy command which accepts a Drush command config array and tries to build an appropriate PsySH command for it.

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.

Find drush.services.yml files.

Use the Symfony Dependency Injection Container to instantiate services.

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

Manage Drush services.

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.

The Drush ProcessManager adds a few Drush-specific service methods.

Discover alias files:

Inflection interface 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.

The base implementation for Drush database connections.

Note: when using this trait, also implement ConfigAwareInterface/ConfigAwareTrait.

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.