PHPackages                             sparkfabrik/drush\_pre\_deploy - 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. sparkfabrik/drush\_pre\_deploy

Abandoned → [drupal/drush\_pre\_deploy](/?search=drupal%2Fdrush_pre_deploy)ArchivedDrupal-module[DevOps &amp; Deployment](/categories/devops)

sparkfabrik/drush\_pre\_deploy
==============================

drush integration that enables "pre-deploy" hooks.

0.0.4(5y ago)11831GPL-2.0-or-laterPHP

Since Aug 4Pushed 5y ago6 watchersCompare

[ Source](https://github.com/sparkfabrik/drush_pre_deploy)[ Packagist](https://packagist.org/packages/sparkfabrik/drush_pre_deploy)[ Docs](https://github.com/sparkfabrik/drush_pre_deploy)[ RSS](/packages/sparkfabrik-drush-pre-deploy/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (6)Used By (0)

drush-pre-deploy
================

[](#drush-pre-deploy)

This project is a drush integration that enables "pre-deploy" hooks.

Drush 10 introduced the [drush deploy](https://www.drush.org/deploycommand/) command with the intent to standardize drupal deployment. `drush deploy` is implemented in terms of a standard sequence of drush commands:

```
drush updatedb --no-cache-clear
drush cache:rebuild
drush config:import
drush cache:rebuild
drush deploy:hook

```

The very last step (`drush deploy:hook`) invokes [HOOK\_deploy\_NAME](https://github.com/drush-ops/drush/blob/10.x/tests/functional/resources/modules/d8/woot/woot.deploy.php) hooks. The "deploy" hooks are similar to [post\_update hooks](https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Extension%21module.api.php/function/hook_post_update_NAME/9.1.x) and are useful when you need to execute code at the very end of the deploy process.

This project introduces the concepts of "pre-deploy" hooks that are executed at the *very beginning* of the deploy process.

They take a similar form of the existing hooks, if your modules is named `foo` then in a `foo.predeploy.php` file you can write a function like this:

```
/**
 * Hook description here.
 */
function foo_predeploy_some_text_here(&$sandbox) {
}

```

Additionally, this project provides the `deploy:pre-hook` and `deploy:pre-hook-status` commands which are similar to the [deploy:hook](https://www.drush.org/commands/10.x/deploy_hook/) and [deploy:hook-status](https://www.drush.org/commands/10.x/deploy_hook-status/) commands. The first command runs pending "pre-deploy" hooks and the second one prints information about pending "pre-deploy" update hooks.

Installation
============

[](#installation)

`composer require sparkfabrik/drush_pre_deploy`

This project requires drush at least at version 10.3.0.

- In your project's main composer.json make sure installer-paths folder is set for "drupal-module" type:

```
"extra": {
  ...
  "installer-paths": {
    ...
    "web/modules/contrib/{$name}": ["type:drupal-module"],

```

To make sure the hook command is discovered, you need to add a custom "drush.yml" configuration in a drush folder like this:

```
.
└── ROOT_PROJECT_PATH/
    └── drush/
        └── drush.yml

```

Drush will discover this file automatically and will use its configuration to load commands. Add the following code into drush.yml:

```
drush:
  include:
  - ${env.PWD}/web/modules/contrib/drush_pre_deploy/src/global

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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 ~13 days

Total

5

Last Release

2048d ago

Major Versions

0.0.1 → 7.x-dev2020-08-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/cb70410cb51e6901fd3d6a7618644edf9c1da9798009df6286c67ecdafdc198c?d=identicon)[grota](/maintainers/grota)

![](https://www.gravatar.com/avatar/96e78b7b1a452d657a5fb3f364505b5a7c6b246b8b8cfe9662f4ca5cf494ab96?d=identicon)[paolomainardi](/maintainers/paolomainardi)

---

Top Contributors

[![grota](https://avatars.githubusercontent.com/u/403432?v=4)](https://github.com/grota "grota (6 commits)")[![Bladedu](https://avatars.githubusercontent.com/u/572359?v=4)](https://github.com/Bladedu "Bladedu (1 commits)")

---

Tags

drupaldeployDrush

### Embed Badge

![Health badge](/badges/sparkfabrik-drush-pre-deploy/health.svg)

```
[![Health](https://phpackages.com/badges/sparkfabrik-drush-pre-deploy/health.svg)](https://phpackages.com/packages/sparkfabrik-drush-pre-deploy)
```

###  Alternatives

[banago/phploy

PHPloy - Incremental Git (S)FTP deployment tool that supports submodules, multiple servers and rollbacks.

1.4k47.2k](/packages/banago-phploy)[easycorp/easy-deploy-bundle

The easiest way to deploy Symfony applications

468310.2k](/packages/easycorp-easy-deploy-bundle)[jalogut/magento2-deployer-plus

Magento 2 deployment tool based on deployer.org

201415.5k](/packages/jalogut-magento2-deployer-plus)[hpatoio/deploy-bundle

Easy deploy via rsync. Porting of Symfony 1 project:deploy command.

3696.6k1](/packages/hpatoio-deploy-bundle)[ngmy/webloyer

Webloyer is a Web UI for managing Deployer deployments

2181.1k](/packages/ngmy-webloyer)[enygma/composerclean

An additional command for Composer that removes configured files/directory

181.8k](/packages/enygma-composerclean)

PHPackages © 2026

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