PHPackages                             joachim-n/drupal-project-contrib-development - 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. joachim-n/drupal-project-contrib-development

ActiveComposer-plugin[DevOps &amp; Deployment](/categories/devops)

joachim-n/drupal-project-contrib-development
============================================

14881[4 issues](https://github.com/joachim-n/drupal-project-contrib-development/issues)[1 PRs](https://github.com/joachim-n/drupal-project-contrib-development/pulls)PHP

Since Jun 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/joachim-n/drupal-project-contrib-development)[ Packagist](https://packagist.org/packages/joachim-n/drupal-project-contrib-development)[ RSS](/packages/joachim-n-drupal-project-contrib-development/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Drupal Contrib Development
==========================

[](#drupal-contrib-development)

This is a set of tools for developing Drupal contrib modules and themes in the context of a project.

Features
--------

[](#features)

### Swich to clone command

[](#swich-to-clone-command)

This is a Composer command which switches a Drupal module from being installed normally to using a git clone that is symlinked into the project.

This allows testing and developing a contrib module in the context of a project.

For example, suppose your Widgets.Com website is using the drupal\_cats module, but you have found a bug in it. You can make changes to the drupal\_cats module files, but they are not under version control, so you cannot make a MR on drupal.org from them. You could copy them to a separate git clone of drupal\_cats, but that quickly becomes tedious with multiple files. Furthermore, your project's installed copy of drupal\_cats is at a fixed release (hopefully!), and the code you want to fix may have changed in the latest HEAD.

The Switch to clone command makes this all simple to do:

1. Your project has the drupal/drupal\_cats package installed with Composer.
2. Do `composer drupal-contrib:switch-clone drupal_cats`. This does the following:
    1. The drupal\_cats git repository is cloned into the ./repos folder in your project.
    2. A Composer path repository is added to composer.json, which points to this git clone. This should *not* be added to version control; it is only needed temporarily while you work on code in the contrib module's git clone.
    3. Composer is updated to use the drupal/drupal\_cats from this repository. This creates a symlink from the ./repos/drupal\_cats folder into the project's ./modules/contrib folder, replacing the previously installed version of the drupal\_cats module.
3. You can now use the git clone of drupal\_cats as normal:
    - Make a feature branch for your fix
    - Check out a fork branch from drupal.org to evaluate a fix
    - Test your code in the context of your project.
    - Push your changes to a drupal.org merge request.

When your fix is ready, remove the 'drupal\_cats' path repository from your composer.json, and do `composer update drupal/drupal_cats` to switch your project back to using the distribution version of the drupal/drupal\_cats package.

If you need to perform any Composer operations in the meantime, you may need to temporarily switch the git repository to the main development branch or the release tag where it was checked out to begin with, in order to satisfy Composer's package version requirements.

### Switch back to package release command

[](#switch-back-to-package-release-command)

This is a Composer command which switches a Drupal module from being installed as a symlink to a git clone, to be being installed normally from a package release.

Use this command to reverse the effect of the `composer drupal-contrib:switch-clone` command, and restore your project's usage of the module to normal operation.

1. Your project has the drupal/drupal\_cats package installed from a symlink.
2. Do `composer drupal-contrib:switch-package drupal_cats`. This does the following:
    1. The Composer path repository which points to the git clone is removed from composer.json.
    2. Composer is updated to download the drupal/drupal\_cats package.

The git repository for the module is not changed or deleted. You can change back to using this with the `drupal-contrib:switch-clone` command.

### Make and apply patch command

[](#make-and-apply-patch-command)

This is a Composer command which applies your work in a module's git clone to the project as a patch.

Use this when you have finished work on a bug or a feature in a contrib module, and want to apply this fix to your project's codebase. The diff from a drupal.org merge request is not always suitable in this scenario, as the merge request will be on the development branch of the module, and the diff for this might not apply to the version that your project it using. Instead, this command takes a diff from the feature branch to the release that your project has installed.

This requires the project to have the `cweagans/composer-patches` package installed.

1. Your project has the drupal/drupal\_cats package installed with Composer, and a git clone at repos/drupal\_cats which has your work in a feature branch.
2. Do `composer drupal-contrib:apply-patch-from-branch drupal_cats`. This does the following:
    1. A git diff is taken from the feature branch in repos/drupal\_cats to the current version of the installed package.
    2. The git diff is written to a patch file in /patches.
    3. Composer is updated to apply the patch to the drupal/drupal\_cats package.

You should also contribute your fix back to drupal.org as a merge request!

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

[](#installation)

Install with Composer:

```
composer require joachim-n/drupal-project-contrib-development

```

Roadmap
-------

[](#roadmap)

- Get the issue title to use in the patch name and composer.json description.
- Add other useful things.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance24

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 Bus Factor1

Top contributor holds 94.4% 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/21043d4af2cb62a3e316647f63749d05fcbab1c9bd5e67ffa2079b0117e8f65a?d=identicon)[joachim-n](/maintainers/joachim-n)

---

Top Contributors

[![joachim-n](https://avatars.githubusercontent.com/u/105262?v=4)](https://github.com/joachim-n "joachim-n (17 commits)")[![webflo](https://avatars.githubusercontent.com/u/123946?v=4)](https://github.com/webflo "webflo (1 commits)")

### Embed Badge

![Health badge](/badges/joachim-n-drupal-project-contrib-development/health.svg)

```
[![Health](https://phpackages.com/badges/joachim-n-drupal-project-contrib-development/health.svg)](https://phpackages.com/packages/joachim-n-drupal-project-contrib-development)
```

###  Alternatives

[deployer/deployer

Deployment Tool

11.0k25.4M206](/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)
