PHPackages                             szeidler/composer-patches-cli - 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. szeidler/composer-patches-cli

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

szeidler/composer-patches-cli
=============================

1.1.2(6mo ago)28259.3k↓55.4%8[3 issues](https://github.com/szeidler/composer-patches-cli/issues)4MITPHPPHP ^8.0CI failing

Since Nov 21Pushed 6mo ago2 watchersCompare

[ Source](https://github.com/szeidler/composer-patches-cli)[ Packagist](https://packagist.org/packages/szeidler/composer-patches-cli)[ RSS](/packages/szeidler-composer-patches-cli/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (5)Versions (16)Used By (4)

Composer Patches CLI
====================

[](#composer-patches-cli)

The Composer Patches CLI provides a simple CLI for [cweagans/composer-patches](https://github.com/cweagans/composer-patches).

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

[](#requirements)

- PHP 7.0 or greater
- Composer

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

[](#installation)

Add Composer Patches CLI as a composer dependency.

`composer global require szeidler/composer-patches-cli:^1.0`

Usage
-----

[](#usage)

### Patch Enable

[](#patch-enable)

The patch enable function enables the patching functionality in your root composer.json. It will create empty patches definition in your composer.json or add a separate composer patch file, when using the `--file` option.

The patch enable command accepts the following options.

- `--file` Filename of the composer patch file to be created

Example:

```
composer patch-enable --file='patches.json'
```

### Patch Add

[](#patch-add)

```
composer patch-add
```

The patch add command accepts the following arguments in the defined order.

1. `` Name of the package to patch.
2. `` Description of the patch to be used.
3. `` URL or local path of the patch file.

Example:

```
composer patch-add drupal/core "SA-CORE-2018-002" "https://cgit.drupalcode.org/drupal/rawdiff/?h=8.5.x&id=5ac8738fa69df34a0635f0907d661b509ff9a28f"
```

The patch add command accepts the following options.

- `--no-update` Use this option to prevent composer to update the package and apply the patch. The patch will only end up in your `composer.json`, not `composer.lock` file.
- `--no-dev` Run the dependency update with the --no-dev option.

You can omit arguments for an interactive mode.

### Patch Remove

[](#patch-remove)

```
composer patch-remove
```

The patch remove command accepts the following arguments in the defined order.

1. `` Name of the package from which you want to remove the patch.
2. `` Description of the patch to be removed.

Example:

```
composer patch-remove drupal/core "SA-CORE-2018-002"
```

You can omit arguments for an interactive mode.

### Patch List

[](#patch-list)

```
composer patch-list
```

The patch add command accepts the following arguments.

1. `` (optional) Name of the package to patch.

If the package argument is omitted, the command will return all defined patches.

Example:

```
$ composer patch-list

Package: drupal/core
+-----------------------------------------+-------------------------------------------------------------------------------------------------+
| Description                             | URL                                                                                             |
+-----------------------------------------+-------------------------------------------------------------------------------------------------+
| Simple decimals fail to pass validation | https://www.drupal.org/files/issues/2018-04-23/drupal_2230909_113.patch                         |
| SA-CORE-2018-002                        | https://cgit.drupalcode.org/drupal/rawdiff/?h=8.5.x&id=5ac8738fa69df34a0635f0907d661b509ff9a28f |
+-----------------------------------------+-------------------------------------------------------------------------------------------------+
```

### Move remote patches to local files.

[](#move-remote-patches-to-local-files)

```
composer patch-remote-to-local
```

Using remote patches has security implications. Therefore it is wise to store them locally. This command will download all remote patches and store them in the given directory. The command will also update your composer.json or composer.patches.json.

The move remote patches to local files command accepts the following arguments.

1. `` The name of the directory the files should be placed in.

Example:

```
composer patch-remote-to-local patches
```

### Patch Migrate

[](#patch-migrate)

```
composer patch-migrate-config
```

The patch migrate command migrates your Composer Patches 1 configuration to the Composer Patches 2 format. It handles the migration of patches, ignored patches, patch levels (converted to package depths).

After a successful migration, the command automatically runs `patches-relock` and `patches-repatch` to ensure your project is up-to-date with the new configuration.

Credits
-------

[](#credits)

Stephan Zeidler for [Ramsalt Lab AS](https://ramsalt.com)

License
-------

[](#license)

The MIT License (MIT)

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance66

Regular maintenance activity

Popularity45

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 92.9% 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 ~202 days

Recently: every ~191 days

Total

12

Last Release

185d ago

PHP version history (3 changes)1.0.0PHP ^7.0

1.0.5PHP ^7.0||^8.0

1.1.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/05bccdb85281776b28deafc2900b52fc8e12fcb25c3fd27870a5c5158db8da89?d=identicon)[szeidler](/maintainers/szeidler)

---

Top Contributors

[![szeidler](https://avatars.githubusercontent.com/u/1475847?v=4)](https://github.com/szeidler "szeidler (65 commits)")[![prudloff-insite](https://avatars.githubusercontent.com/u/50333926?v=4)](https://github.com/prudloff-insite "prudloff-insite (2 commits)")[![danepowell](https://avatars.githubusercontent.com/u/1984514?v=4)](https://github.com/danepowell "danepowell (1 commits)")[![jacquesbh](https://avatars.githubusercontent.com/u/858611?v=4)](https://github.com/jacquesbh "jacquesbh (1 commits)")[![JPustkuchen](https://avatars.githubusercontent.com/u/637807?v=4)](https://github.com/JPustkuchen "JPustkuchen (1 commits)")

---

Tags

composer

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/szeidler-composer-patches-cli/health.svg)

```
[![Health](https://phpackages.com/badges/szeidler-composer-patches-cli/health.svg)](https://phpackages.com/packages/szeidler-composer-patches-cli)
```

###  Alternatives

[symfony/runtime

Enables decoupling PHP applications from global state

74798.8M1.0k](/packages/symfony-runtime)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5344.1M564](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2124.7M203](/packages/drupal-core-project-message)[sandersander/composer-link

Adds ability to link local packages for development with composer

98457.9k](/packages/sandersander-composer-link)[phpro/grumphp-shim

GrumPHP Phar distribution

294.7M340](/packages/phpro-grumphp-shim)

PHPackages © 2026

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