PHPackages                             jpstacey/composer-patcher - 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. jpstacey/composer-patcher

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

jpstacey/composer-patcher
=========================

Runs patches against projects after install

1.1.0(11y ago)9521PHPPHP &gt;=5.3.0

Since Aug 20Pushed 10y ago3 watchersCompare

[ Source](https://github.com/jpstacey/composer-patcher)[ Packagist](https://packagist.org/packages/jpstacey/composer-patcher)[ RSS](/packages/jpstacey-composer-patcher/feed)WikiDiscussions master Synced today

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

composer-patcher
================

[](#composer-patcher)

The project jpstacey/composer-patcher is now deprecated in favour of [netresearch/composer-patches-plugin](https://github.com/netresearch/composer-patches-plugin).

Please update your composer.json files accordingly.

Old documentation, for reference
--------------------------------

[](#old-documentation-for-reference)

Plugin to patch composer downloads post-hoc.

Arguably you wouldn't want to do this, if you could avoid it. But it's the way that a lot of existing drupal.org patch workflow happens (especially via Drush make) and so this provides a useful transition technology.

Minimum `composer.json`
-----------------------

[](#minimum-composerjson)

The package is now registered on Packagist:

so you should only require the following minimum JSON:

```
{
    "require": {
        "jpstacey/composer-patcher": "*"
    },
    "scripts": {
        "post-package-install": "Composer\\Patcher\\PatcherPlugin::postPackageInstall"
    }
}
```

The "scripts" is required in your root `composer.json` as it will not run in a subsidiary `composer.json` for security reasons.

Example `composer.json`
-----------------------

[](#example-composerjson)

Downloads and patches a Drupal module:

```
{
    "repositories": {
        "xmlsitemap": {
            "type": "package",
            "package": {
                "name": "drupal/xmlsitemap",
                "type": "drupal-module",
                "version": "2.0-rc2",
                "dist": {
                    "url": "http://ftp.drupal.org/files/projects/xmlsitemap-7.x-2.0-rc2.tar.gz",
                    "type": "tar"
                },
                "extra": {
                    "patch": [
                        "https://drupal.org/files/include_inc_file-1392710.patch"
                    ]
                }
            }
        }
    },
    "require": {
        "jpstacey/composer-patcher": "*",
        "drupal/xmlsitemap": "2.0-rc2"
    },
    "scripts": {
        "post-package-install": "Composer\\Patcher\\PatcherPlugin::postPackageInstall"
    }
}
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~6 days

Total

2

Last Release

4274d ago

### Community

Maintainers

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

---

Top Contributors

[![jpstacey](https://avatars.githubusercontent.com/u/187682?v=4)](https://github.com/jpstacey "jpstacey (5 commits)")

### Embed Badge

![Health badge](/badges/jpstacey-composer-patcher/health.svg)

```
[![Health](https://phpackages.com/badges/jpstacey-composer-patcher/health.svg)](https://phpackages.com/packages/jpstacey-composer-patcher)
```

###  Alternatives

[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

2994.3M14](/packages/vaimo-composer-patches)[mglaman/composer-drupal-lenient

1317.4M15](/packages/mglaman-composer-drupal-lenient)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M440](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)[olvlvl/composer-attribute-collector

A convenient and near zero-cost way to retrieve targets of PHP 8 attributes

184108.8k8](/packages/olvlvl-composer-attribute-collector)[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

41716.4k2](/packages/lullabot-drainpipe)

PHPackages © 2026

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