AnnotatedCommands are created automatically by the AnnotatedCommandFactory. Each command method in a command file will produce one AnnotatedCommand. These are then added to your Symfony Console Application object; nothing else is needed.

The AnnotatedCommandFactory creates commands for your application.

Misc deprecated

Make a generic cache object conform to our expected interface.

An empty cache that never stores or fetches any objects.

Documentation interface.

Command cration listeners can be added to the annotation command factory. These will be notified whenever a new commandfile is provided to the factory. This is useful for initializing new commandfile objects.

Command cration listeners can be added to the annotation command factory. These will be notified whenever a new commandfile is provided to the factory. This is useful for initializing new commandfile objects.

Return a CommandError as the result of a command to pass a status code and error message to be displayed.

Do discovery presuming that the namespace of the command will contain the last component of the path. This is the convention that should be used when searching for command files that are bundled with the modules of a framework. The convention used is that the namespace for a module in a framework should start with the framework name followed by the module name.

Process a command, including hooks and other callbacks.

Return a CommandResult as the result of a command to pass both an exit code and result data from a command.

If an annotated command method encounters an error, then it should either throw an exception, or return a result object that implements ExitCodeInterface.

Alter the result of a command after it has been processed.

Call hooks

Extract Output hooks are used to select the particular data elements of the result that should be printed as the command output -- perhaps after being formatted.

Manage named callback hooks

Non-interactively (e.g. via configuration files) apply configuration values to the Input object.

Interactively supply values for missing required arguments for the current command. Note that this hook is not called if the --no-interaction flag is set.

Add options to a command.

A result processor takes a result object, processes it, and returns another result object. For example, if a result object represents a 'task', then a task-runner hook could run the task and return the result from that execution.

Validate the arguments for the current command.

StdinAwareInterface should be implemented by classes that read from standard input. This class contains facilities to redirect stdin to instead read from a file, e.g. in response to an option or argument value.

StdinAwareTrait provides the implementation for StdinAwareInterface.

StdinHandler is a thin wrapper around php://stdin. It provides methods for redirecting input from a file, possibly conditionally under the control of an Input object.

AlterOptionsCommandEvent is a subscriber to the Command Event that looks up any additional options (e.g. from an OPTION_HOOK) that should be added to the command. Options need to be added in two circumstances:

Option providers can add options to commands based on the annotations present in a command. For example, a command that specifies @fields will automatically be given --format and --fields options.

If an annotated command method returns an object that implements OutputDataInterface, then the getOutputData() method is used to fetch the output to print from the result object.

Prepare parameter list for execurion. Handle injection of any special values (e.g. $input and $output) into the parameter list.

Provide an object for the specified interface or class name.

Given a class and method name, parse the annotations in the DocBlock comment, and provide accessor methods for all of the elements that are needed to create a Symfony Console Command.

Deserialize a CommandInfo object

Serialize a CommandInfo object

An associative array that maps from key to default value; each entry can also have a description and suggested values.

Given a class and method name, let each attribute handle its own properties, populating the CommandInfo object.

Given a class and method name, parse the annotations in the DocBlock comment, and provide accessor methods for all of the elements that are needed to create an annotated Command.

Create an appropriate CommandDocBlockParser.

Methods to convert to / from a csv string.

Hold a default value.

Simple utility methods when working with docblock comments.

Hold the tag definition for one tag in a DocBlock.

Hold some state. Collect tags.

Write the results of a command. Inject your ResultWriter into the CommandProcessor.

Contains some helper functions used by exceptions in this project.

Represents an incompatibility between the output data and selected formatter.

Represents an incompatibility between the output data and selected formatter.

Indicates that the requested format does not exist.

Indicates that the requested format does not exist.

Manage a collection of formatters; return one on request.

Comma-separated value formatters

Marker interface that indicates that a cell data renderer (Consolidation\OutputFormatters\SturcturedData\RenderCellInterface) may test for to determine whether it is allowable to add human-readable formatting into the cell data (Consolidation\OutputFormatters\SturcturedData\NumericCallRenderer).

Json formatter

Display the data in a simple list.

No output formatter

Print_r formatter

Display sections of data.

Serialize formatter

String formatter

Display a table of data with the Symfony Table class.

Tab-separated value formatters

Var_dump formatter

Var_export formatter

Display a table of data with the Symfony Table class.

Yaml formatter

FormatterOptions holds information that affects the way a formatter renders its output.

Base class for all list data types.

Holds an array where each element of the array is one row, and each row contains an associative array where the keys are the field names, and the values are the field data.

AssociativeList deprecated

Old name for PropertyList class.

FieldProcessor will do various alterations on field sets.

ListDataFromKeys deprecated

A structured data object may contains some elements that are actually metadata. Metadata is not included in the output of tabular data formatters (e.g. table, csv), although some of these (e.g. table) may render the metadata alongside the data. Raw data formatters (e.g. yaml, json) will render both the data and the metadata.

Create a formatter to add commas to numeric data.

Holds an array where each element of the array is one key : value pair. The keys must be unique, as is typically the case for associative arrays.

Holds an array where each element of the array is one row, and each row contains an associative array where the keys are the field names, and the values are the field data.

A RowsOfFields data structure that also contains metadata.

Represents aribtrary unstructured array data where the data to display in --list format comes from the array keys.

UnstructuredInterface is a marker interface that indicates that the data type is unstructured, and has no default conversion to a string.

Represents aribtrary unstructured array data where the data to display in --list format comes from the array keys.

When using arrays, we could represent XML data in a number of different ways.

Simplify a DOMDocument to an array.

Transform a string of properties into a PHP associative array.

Reorder the field labels based on the user-selected fields to display.

Calculate column widths for table cells.

Calculate the width of data in table cells in preparation for word wrapping.

Formatters may implement ValidDataTypesInterface in order to indicate exactly which formats they support. The validDataTypes method can be called to retrieve a list of data types useful in providing hints in exception messages about which data types can be used with the formatter.

Provides a default implementation of isValidDataType.

Formatters may implement ValidationInterface in order to indicate whether a particular data structure is supported. Any formatter that does not implement ValidationInterface is assumed to only operate on arrays, or data types that implement SimplifyToArrayInterface.

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.

An alias record is a configuration record containing well-known items.

Discover alias files named:

Discover alias files:

An alias record is a configuration record containing well-known items.

Site Alias manager

Inflection interface for the site alias manager.

Inflection trait for the site alias manager.

Site Alias manager methods used to set up the object.

Site Alias manager

Parse a string that contains a site alias name, and provide convenience methods to access the parts.

Common implementation of some SiteAlias methods.

SiteAliasWithConfig delegates to a site alias, and also combines it with two config stores:

Parse a string that contains a site specification.

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 Drupal 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.

Drush commands revealing Drupal dependencies.

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.

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.

Registers a new migrate_prepare_row hook implementation.

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.

Class AbstractClassDiscovery

Interface ClassDiscoveryInterface

Class RelativeNamespaceDiscovery

Creates a task wrapper that converts any Callable into an object that can be used directly with a task collection.

Group tasks into a collection that run together. Supports rollback operations for handling error conditions.

Creates a collection, and adds tasks to it. The collection builder offers a streamlined chained-initialization mechanism for easily creating task groups. Facilities for creating working and temporary directories are also provided.

The collection process hook is added to the annotation command hook manager in Runner::configureContainer(). This hook will be called every time a command runs. If the command result is a \Robo\Contract\TaskInterface (in particular, \Robo\Collection\Collection), then we run the collection, and return the result. We ignore results of any other type.

Creates a task wrapper that will manage rollback and collection management to a task when it runs. Tasks are automatically wrapped in a CompletionWrapper when added to a task collection.

One element in a collection. Each element consists of a task all of its before tasks, and all of its after tasks.

Creates a task wrapper that converts any Callable into an object that will execute the callback once for each item in the provided collection.

The temporary collection keeps track of the global collection of temporary cleanup tasks in instances where temporary-generating tasks are executed directly via their run() method, rather than as part of a collection.

Use this to add arguments and options to the $arguments property.

This task can receive commands from task implementing CommandInterface.

Simplifies generating of configuration chanined methods.

This task is supposed to be executed as shell command.

This task specifies exactly one shell command.

Class ExecTrait

IO

Adapt OutputInterface or other output function to the VerbosityThresholdInterface.

ProcessUtils is a bunch of utility methods. We want to allow Robo 1.x to work with Symfony 4.x while remaining backwards compatibility. This requires us to replace some deprecated functionality removed in Symfony.

Wrapper around \Symfony\Component\Console\Helper\ProgressBar

Task input/output methods. TaskIO is 'used' in BaseTask, so any task that extends this class has access to all of the methods here.

Task input/output methods. TaskIO is 'used' in BaseTask, so any task that extends this class has access to all of the methods here.

Config deprecated

Task that implements this interface can be injected as a parameter for other task.

Any Robo tasks that implements this interface will be called when the task collection it is added to completes.

Adapt OutputInterface or other output function to the VerbosityThresholdInterface.

If task prints anything to console

Any Robo task that uses the Timer trait and implements ProgressIndicatorAwareInterface will display a progress bar while the timer is running.

Robo tasks that take multiple steps to complete should implement this interface.

Any Robo tasks that implements this interface will be called when the task collection it is added to fails, and runs its rollback operation.

Task that implements this interface can be injected as a parameter for other task.

All Robo tasks should implement this interface.

Record and determine whether the current verbosity level exceeds the desired threshold level to produce output.

By default, rollbacks and completions tasks or callbacks continue even if errors occur. If you would like to explicitly cancel or abort the rollback or completion, you may throw this exception to abort the subsequent tasks in the rollback or completion task list.

Log the creation of Result objects.

Robo Log Styler.

Robo's default logger

Manages the container reference and other static data. Favor using dependency injection wherever possible. Avoid using this class directly, unless setting up a custom DI container.

A State\Data object contains a "message" (the primary result) and a data array (the persistent state). The message is transient, and does not move into the persistent state unless explicitly copied there.

Executes ApiGen command to generate documentation

Extracts an archive.

Creates a zip or tar archive.

Minifies images.

Compiles less files.

Minifies an asset file (CSS or JS).

Compiles scss files.

Executes shell script. Closes it when running in background mode.

Execute commands one by one in stack.

Class ParallelExecTask

Executes Symfony Command

Runs task when specified file or dir was changed.

Bower Install

Bower Update

Composer Check Platform Requirements

Composer Config

Composer CreateProject

Composer Dump Autoload

Composer Init

Composer Install

Composer Remove

Composer Require

Composer Update

Composer Validate

Helps to manage changelog file.

Simple documentation generator from source files.

Generate a Robo Task that is a wrapper around an existing class.

Publishes new GitHub release.

Opens the default's user browser code inspired from openBrowser() function in https://github.com/composer/composer/blob/master/src/Composer/Command/HomeCommand.php

Creates Phar.

Runs PHP server and stops it when task finishes.

Helps to maintain .semver file.

Builds Docker image

Commits docker container to an image

Executes command inside running Docker container

Pulls an image from DockerHub

Remove docker container

Run

Performs docker run on a container.

Starts Docker container

Stops Docker container

Merges files into one. Used for preparing assets.

Performs search and replace inside a files.

Create a temporary file that is automatically cleaned up once the task collection is is part of completes. When created, it is given a random filename.

Writes to file.

Deletes all files from specified dir, ignoring git files.

Copies one dir into another

Deletes dir

Wrapper for Symfony Filesystem Component.

Searches for files in a nested directory structure and copies them to a target directory with or without the parent directories. The task was inspired by gulp-flatten.

Mirrors a directory to another

Create a temporary directory that is automatically cleaned up once the task collection is is part of completes.

Create a temporary working directory that is automatically renamed to its final desired location if all of the tasks in the collection succeed. If there is a rollback, then the working directory is deleted.

Run

Gulp Run

Rotates a log (or any other) file

Truncates a log (or any other) file

Npm Install

Npm Update

Executes rsync in a flexible manner.

Ssh

Runs multiple commands on a remote server.

Extend StackBasedTask to create a Robo task that runs a sequence of commands.

Runs atoum tests

Executes Behat tests

Executes Codeception tests

Runs PHPUnit tests

Executes Phpspec tests

Runs Git commands in stack. You can use stopOnFail() to point that stack should be terminated on first fail.

Runs hg commands in stack. You can use stopOnFail() to point that stack should be terminated on first fail.

Runs Svn commands in stack. You can use stopOnFail() to point that stack should be terminated on first fail.