PHPackages                             blackbird/magento-quality-patches-applier - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. blackbird/magento-quality-patches-applier

ActiveComposer-plugin[Testing &amp; Quality](/categories/testing)

blackbird/magento-quality-patches-applier
=========================================

A Composer plugin that manages the application of patches from magento/quality-patches

1.0.3(1mo ago)29.6k↓62.8%1MITPHPPHP &gt;=7.3

Since Oct 3Pushed 6d agoCompare

[ Source](https://github.com/blackbird-agency/magento-quality-patches-applier)[ Packagist](https://packagist.org/packages/blackbird/magento-quality-patches-applier)[ RSS](/packages/blackbird-magento-quality-patches-applier/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)Dependencies (8)Versions (5)Used By (0)

Magento Quality Patches Applier
===============================

[](#magento-quality-patches-applier)

[![Latest Stable Version](https://camo.githubusercontent.com/6541b99fab39a9edacba53f625ce6b2d95d782443beddd5c04b1846e982f2d5a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626c61636b626972642f6d6167656e746f2d7175616c6974792d706174636865732d6170706c6965722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/blackbird/magento-quality-patches-applier)[![License: MIT](https://camo.githubusercontent.com/a7e65aee57b11d28e4caff8b945729a66be0bb663f7f93bd24c5aa65699f148e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](./LICENSE)

A Composer plugin that manages the application of patches from magento/quality-patches.

The free source is available at the GitHub repository of this project.

What it does
------------

[](#what-it-does)

This Composer plugin hooks into install/update commands to automatically revert previously applied Magento Quality Patches and apply the ones you request, using the magento/quality-patches CLI under the hood.

- Before install/update: it reverts all currently applied patches (safety to avoid conflicts).
- After install/update: it applies the patches you configured.

It relies on the magento/quality-patches package binary (vendor/bin/magento-patches) and your composer.json "extra" configuration.

Staying current with monthly patch releases:

- Magento publishes a new monthly release of Required patches roughly every month (e.g. a "July 2026" release followed by an "August 2026" release).
- With extra.magento-patches.auto-install-required-patches enabled, you don't need to track or list these new patch IDs yourself: even a simple `composer update magento/magento-cloud-patches` triggers the plugin's revert/apply cycle, which re-reads the current patch status and automatically applies every Required patch it finds "Not applied" — including any newly published ones.
- This also covers catching up after skipping a release: if your project was still on the July 2026 patch level and you update straight to August 2026, the plugin will apply the outstanding Required patches from both the July and August releases in that same run, not just the latest month, since it re-checks patch status after each apply pass until nothing new is left to apply.
- Note: this only works if your project is already on the latest Magento patch version (e.g. 2.4.8-p5). Quality/monthly patches target a specific patch level, so if your magento/product-community-edition (or enterprise-edition) constraint is behind the latest p-release, the status command won't report those patches as applicable and they won't be auto-installed until you first upgrade Magento itself to that patch level.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.3
- Composer (Plugin API ^1.0 or ^2.0)
- magento/quality-patches (this package requires it)
- A Magento project (the patches are intended for Magento)

Setup
-----

[](#setup)

### Get the package

[](#get-the-package)

Composer Package:

```
composer require blackbird/magento-quality-patches-applier

```

This will also install magento/quality-patches if it is not already present.

### Configure patches to apply

[](#configure-patches-to-apply)

In your project composer.json, define the patches you want in the extra.magento-patches.apply section. You can also list patches to ignore.

Example:

```
{
  "extra": {
    "magento-patches": {
      "auto-install-required-patches": true,
      "apply": [
        "AC-1234",
        "MC-5678"
      ],
      "ignore": [
        "MDVA-99999"
      ]
    }
  }
}

```

Special values for apply:

- "all", "\*", or "ALL" applies all patches that are currently "Not applied" according to the status command.

Auto-installing required patches:

- Set extra.magento-patches.auto-install-required-patches to true to automatically apply every currently "Not applied" patch whose Details field starts with "Patch type: Required" (as reported by the status command), in addition to whatever is listed in apply.
- This is independent from apply: patches explicitly listed in apply are always applied regardless of this setting, and patches listed in ignore are always excluded, even if auto-install-required-patches is enabled.
- Defaults to false (disabled) when not set.

Console output for required patches (dev mode):

- When Composer runs in dev mode (i.e. not with --no-dev), after a successful application the plugin prints the Title and Details of every applied patch that is of type "Required".

Environment/config flags:

- Set environment variable COMPOSER\_EXIT\_ON\_MAGENTO\_PATCH\_FAILURE=1 (or add extra.composer-exit-on-magento-patch-failure: true) to make Composer fail if patch application fails.

### Install / Update

[](#install--update)

Run your usual Composer commands from your project root:

```
composer install
# or
composer update

```

The plugin will:

1. Revert applied patches before the command runs.
2. Apply requested patches after dependencies are resolved.

If you enable verbose Composer output (-vvv), the plugin will display the exact magento-patches commands it executes.

How it works
------------

[](#how-it-works)

Internally, the plugin subscribes to Composer script events:

- pre-install-cmd, pre-update-cmd: revertPatches
- post-install-cmd, post-update-cmd: applyPatches

It uses the magento-patches binary to retrieve status (JSON), revert --all, and apply the requested patch IDs. If the magento-patches binary is not found under Composer’s bin-dir, the plugin will fail with a clear message.

Troubleshooting
---------------

[](#troubleshooting)

- magento-patches binary not found

    - Ensure magento/quality-patches is installed and composer’s bin-dir (typically vendor/bin) contains magento-patches. Re-run composer install.
- Patch application fails

    - Re-run with -vvv for details.
    - Set COMPOSER\_EXIT\_ON\_MAGENTO\_PATCH\_FAILURE=1 to let Composer stop on failures.
    - Check for local changes conflicting with patches. Consider reverting changes or adjusting ignore/apply lists.
- No patches applied

    - Verify extra.magento-patches.apply is set and not empty. Use "all" to apply all not-yet-applied patches.

Support
-------

[](#support)

- If you have any issue with this code, feel free to open an issue on your project tracker or contact Blackbird.
- Contributions are welcome. Please open a pull request.

Contact
-------

[](#contact)

For further information, contact Blackbird:

- by email:
- by form:

Authors
-------

[](#authors)

From Blackbird Team ()

License
-------

[](#license)

This project is licensed under the MIT License - see the LICENSE file for details.

That's all folks!

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance97

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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 ~96 days

Total

4

Last Release

30d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12445118?v=4)[anthony-blackbird](/maintainers/anthony-blackbird)[@anthony-blackbird](https://github.com/anthony-blackbird)

---

Top Contributors

[![bruno-blackbird](https://avatars.githubusercontent.com/u/77049160?v=4)](https://github.com/bruno-blackbird "bruno-blackbird (7 commits)")

### Embed Badge

![Health badge](/badges/blackbird-magento-quality-patches-applier/health.svg)

```
[![Health](https://phpackages.com/badges/blackbird-magento-quality-patches-applier/health.svg)](https://phpackages.com/packages/blackbird-magento-quality-patches-applier)
```

###  Alternatives

[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k17.0M1.1k](/packages/phpro-grumphp)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5346.5M600](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2125.4M213](/packages/drupal-core-project-message)[phpro/grumphp-shim

GrumPHP Phar distribution

284.9M348](/packages/phpro-grumphp-shim)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13195.6k8](/packages/youwe-testing-suite)[altis/core

Core module for Altis

19233.0k4](/packages/altis-core)

PHPackages © 2026

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