PHPackages                             ec-europa/phpdrush - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ec-europa/phpdrush

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

ec-europa/phpdrush
==================

Php library for interacting with Drush Drupal cli tool

0.2.0(8y ago)32.0kEUPLPHPPHP &gt;=5.3.0

Since Oct 16Pushed 8y ago8 watchersCompare

[ Source](https://github.com/ec-europa/PhpDrush)[ Packagist](https://packagist.org/packages/ec-europa/phpdrush)[ Docs](https://github.com/ec-europa/phpdrush)[ RSS](/packages/ec-europa-phpdrush/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (26)Used By (0)

Drush PHP
=========

[](#drush-php)

Php library for interacting with [Drush](https://github.com/drush-ops/drush) Drupal cli tool

Warning
-------

[](#warning)

You shall not use this library directly in a webpage, since running one of those methods will take minutes to finish. Instead, this class is made to be used by command line tools, like deployment tools.

Installation **(with composer)** :
----------------------------------

[](#installation-with-composer-)

```
composer install

```

Usage
-----

[](#usage)

```
require 'vendor/autoload.php';

$drush = new \PhpDrush\PhpDrush( '/local/path/to/drush', '/local/path/to/site' );

// run updb :

$drush->updateDatabase();

// run registry rebuild (rr) :

$drush->registryRebuild();

// run full feature revert :

$drush->featuresRevert();

// run selective feature revert :

$drush->featuresRevert(
    ['feature1','feature2','feature3']
);

// enable maintenance mode :

$drush->setMaintenanceMode(true);

// clear all caches :

$drush->clearCache();

// evaluate php code in the drush context
$drush->ev('echo "Hello world!"');
```

Tests
-----

[](#tests)

### Performing a PHP\_CodeSniffer analysis

[](#performing-a-php_codesniffer-analysis)

Before committing, ensure your code is clean by running either composer phpcs or bin/phpcs

```
./bin/phpcs -p --report=full --report=source --report=summary -s --colors

```

### Performing PHPUnit tests

[](#performing-phpunit-tests)

Before committing, ensure there is no regression by running either composer phpunit or bin/phpunit

A drupal instance is needed to perform PHPUnit tests. It can be quickly install using drush:

```
./bin/drush dl drupal-7 --drupal-project-rename=drupal --yes
./bin/drush -r drupal site-install standard --account-name=admin --account-pass=admin --db-url=mysql://username:password@hostname/database --yes

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 59% 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.

###  Release Activity

Cadence

Every ~36 days

Recently: every ~128 days

Total

22

Last Release

3101d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/caac07a8b3883a140b586c1a6ef963f2b688fbdac6e045b24f5623af5497b30f?d=identicon)[ec-europa](/maintainers/ec-europa)

---

Top Contributors

[![gboddin](https://avatars.githubusercontent.com/u/4395092?v=4)](https://github.com/gboddin "gboddin (23 commits)")[![gervasek](https://avatars.githubusercontent.com/u/14055017?v=4)](https://github.com/gervasek "gervasek (16 commits)")

---

Tags

phphelperdrupalDrush

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ec-europa-phpdrush/health.svg)

```
[![Health](https://phpackages.com/badges/ec-europa-phpdrush/health.svg)](https://phpackages.com/packages/ec-europa-phpdrush)
```

###  Alternatives

[zjkal/time-helper

一个简单快捷的PHP日期时间助手类库。 a smart PHP datetime helper library.

21128.6k1](/packages/zjkal-time-helper)

PHPackages © 2026

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