Download the PHP package drush/example-drush-extension without Composer

On this page you can find all versions of the php package drush/example-drush-extension. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package example-drush-extension

Example Drush Extension

Build Status

This is an example Drush extension that is compatible with both Drush 9.6+ and Drush 8.2+. It includes tests that run on both versions of Drush.

This this project demonstrates what is known as a "site-wide" Drush extension. Site-wide extensions are installed via Composer into a particular Drupal site. The other kinds of Drush extensions are Drush module commands and Drush global commands. See the Creating Custom Drush Commands documentation for more information.

For maximum compatibility with future versions of Drush, a site-wide Drush extension should only call the following APIs:

Avoid using Drush APIs, save for those that are defined by your command's base class, DrushCommands, or those that are provided by objects injected into your command class by Drush. See ExampleCommands.php for examples.

Usage

In development, clone this repository, then set up the System Under Test (sut) via:

That will set up your local project to run and test with Drush 9. To use Drush 8 instead:

The Composer Test Scenarios project is used to manage the Composer dependencies needed to test different scenarios of this project. Running composer scenario is like running composer install; it will install the appropriate dependencies for the requested testing scenario. Run composer install to return to the default installation.

To use this extension in production (that is, to install it in a Drupal 8 site):

Running Tests

Set up for 'development' as described in usage section. Then, run:

Ad-hoc Testing

In development:

In production:

Customizing

  1. Fork this repository.
  2. Alter "name", "description" and etc. in composer.json to suit.
  3. Rename ExampleCommands.php and ExampleCommandsTest.php for your project.
  4. Configuration and site aliases for use in testing can be placed in 'sut/drush/drush.yml' and 'sut/drush/sites/self.site.yml', respectively.
  5. Examine 'sut/drush/drush.yml' and 'sut/drush/drushrc.php', and alter the names of the example command files to match the names in your project. This is necessary for Drush to be able to find your command files when running tests or doing ad-hoc testing, as usually, command files are searched for in the parent directory of the project root.
  6. Add your extension on packagist.org so that it may be installed via Composer.

All versions of example-drush-extension with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
consolidation/site-alias Version ^3.0.0@stable
consolidation/site-process Version ^2.0.0@stable
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package drush/example-drush-extension contains the following files

Loading the files please wait ....