PHPackages                             humbkr/magallanes-drush - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. humbkr/magallanes-drush

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

humbkr/magallanes-drush
=======================

Drush tasks for Magallanes 3 php deployment tool

07PHP

Since Dec 22Pushed 8y ago1 watchersCompare

[ Source](https://github.com/humbkr/magallanes-drush)[ Packagist](https://packagist.org/packages/humbkr/magallanes-drush)[ RSS](/packages/humbkr-magallanes-drush/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

magallanes-drush
================

[](#magallanes-drush)

Drush tasks for Magallanes 3

Available commands
------------------

[](#available-commands)

drush/cache-clear
drush/cache-rebuild
drush/config-export
drush/config-import
drush/custom
drush/features-revert
drush/update-database

Installation
------------

[](#installation)

Install via composer:

```
composer require humbkr/magallanes-drush

```

Then add the provided tasks as custom tasks in .mage.yml to use them:

```
magephp:
    ...
    custom_tasks:
        - 'MageDrush\Task\DrushCacheRebuildTask'
        - 'MageDrush\Tasks\DrushUpdateDatabaseTask'
        ...

```

Notes:

- list of available classes is available in vendor/humbkr/magallanes-drush/Task
- you can add only the tasks you require in your deployment script

Use
---

[](#use)

After adding the tasks you want to use to the list of custom classes, you can use them in any deployment step, like so:

```
magephp:
    environments:
        prod:
            drush: { alias: mywebsite }
            pre-deploy:
            on-deploy:
            on-release:
                - drush/sqldump { file: '/var/tmp/before-release.sql' }
            post-release:
                - drush/update-database
                - drush/config-import
                - drush/cache-rebuild
            post-deploy:

```

All the drush tasks have the following common parameters:

- alias: the drush alias to use when running the command (optionnal)
- drupal\_root: the path to cd into before running the command (optionnal)

To avoid repetition, you can specify theses parameters with the global configuration item "drush". This item can be set in the global level or for each environment.

Global level:

```
magephp:
    ...
    drush: { alias: mywebsite }
    ...

```

Per environment:

```
magephp:
    environments:
        uat:
            ...
            drush: { alias: mywebsite_uat }
            ...

        prod:
            ...
            drush: { alias: mywebsite_prod }
            ...

```

Moreover, each configuration item overrides the parent one, so a global drush configuration can be set and them overridden on a specific environment or even on a per-command basis.

Examples:

```
magephp:
    drush: { alias: mywebsite }
    environments:
        uat:
            ...
            # Only UAT env has a different alias for whatever reason.
            drush: { alias: mywebsite_uat }
            ...
        prod:
            ...
            # Will use the global "mywebsite" alias.
            ...

```

```
magephp:
    drush: { alias: mywebsite }
    environments:
        prod:
            pre-deploy:
                # No alias used on the dev machine (note: it would be useful though).
                - drush/config-export { alias: '', drupal_root: 'drupal/web/sites/default' }
            on-deploy:
            on-release:
            post-release:
                - drush/update-database
                - drush/config-import
                - drush/cache-rebuild
            post-deploy:

```

Documentation
-------------

[](#documentation)

###### drush/cache-clear

[](#drushcache-clear)

Description: (d7) Clear caches
Drush command: `drush cc `
Options:

- caches (optional) : list of caches to be cleared (separated by a space). If not specified, clear all caches

###### drush/cache-rebuild

[](#drushcache-rebuild)

Description: (d8) Rebuild caches
Drush command: `drush cr`

###### drush/config-export

[](#drushconfig-export)

Description: (d8) Export the configuration to the sync folder specified in settings.php
Drush command: `drush cex -y`

###### drush/config-import

[](#drushconfig-import)

Description: (d8) Import the configuration from the sync folder specified in settings.php
Drush command: `drush cim -y`

###### drush/custom

[](#drushcustom)

Description: Run a specified drush command. Use only if you can't create a proper custom Magallanes task.
Drush command: `drush `
Options:

- command (mandatory): the drush command to run, without the "drush" part. Ex: "en mymodule"

###### drush/features-revert

[](#drushfeatures-revert)

Description: Revert one or several Features
Drush command: `drush fr  -y` / `drush fra -y`
Options:

- features (optional): List of Features to revert, separated by spaces. If not specified, all Features will be reverted.

###### drush/update-database

[](#drushupdate-database)

Description: Runs database updates
Drush command: `drush updb -y`

Contributions
-------------

[](#contributions)

Feel free to submit your pull requests to add new drush commands. Your requests must be done on branch master. Rules :

- drush command must be a command that is helping during multiple deployment process
- your command class must inherit from DrushAbstractTask

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7ea287ddf10f9da25a834f77a8815bca02a939ac6e2c5444f70d790b0a13458e?d=identicon)[humbkr](/maintainers/humbkr)

---

Top Contributors

[![humbkr](https://avatars.githubusercontent.com/u/845297?v=4)](https://github.com/humbkr "humbkr (12 commits)")

### Embed Badge

![Health badge](/badges/humbkr-magallanes-drush/health.svg)

```
[![Health](https://phpackages.com/badges/humbkr-magallanes-drush/health.svg)](https://phpackages.com/packages/humbkr-magallanes-drush)
```

###  Alternatives

[deployer/deployer

Deployment Tool

11.0k25.4M207](/packages/deployer-deployer)[appwrite/server-ce

End to end backend server for frontend and mobile apps.

55.3k84.2k](/packages/appwrite-server-ce)[pragmarx/health

Laravel Server &amp; App Health Monitor and Notifier

2.0k1.0M2](/packages/pragmarx-health)[felixfbecker/language-server-protocol

PHP classes for the Language Server Protocol

22476.7M6](/packages/felixfbecker-language-server-protocol)[heroku/heroku-buildpack-php

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku

8161.3M10](/packages/heroku-heroku-buildpack-php)[tiamo/phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard

4674.7k](/packages/tiamo-phpas2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
