cweagans/composer-patches
Provides a way to patch Composer packages.
2.0.0
106M downloads/mo
#422 most downloaded on Packagist
cweagans/composer-patches
What this package is like to depend on
Last release 9 months ago
30 Oct 2025
Ships fairly regularly
a new release about every 8 months
Some releases are documented
notes for 7 of 19 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
21 releases · first in 2015
1 release in the last 12 months
see the full history below
Release timeline
21 releases · Apr 2015 to Oct 2025Releases
latest 21-
2.0.030 Oct 2025Release notes
Open source →What's Changed
- Revamp testing framework by @cweagans in #162
- Exit on patch failure should use composer extra, not localPackage by @kdebisschop in #166
- Fixes #148: Incompatible with Git 2.14+. by @danepowell in #165
- Use cweagans/composer-configurable-plugin by @cweagans in #164
- Add a patch value object + support a more verbose patch format by @cweagans in #211
- Split out patch resolution into Composer Capabilities by @cweagans in #212
- Remove patch report generation by @cweagans in #213
- Make sure that Patch and PatchCollection objects can be correctly serialized/deserialized by @cweagans in #214
- Add missing ext-json in composer.json. by @drupol in #248
- Use strict comparison. by @drupol in #249
- Add contributing section to readme. by @ElijahLynn in #264
- Use empty() instead of isset() to check for empty arrays in RootComposer (test coverage 100%) by @ElijahLynn in #265
- Remove dependency patch resolution by @cweagans in #267
- [docs] Fix grumphp command in readme. by @ElijahLynn in #269
- Retry failed downloads once by @Berdir in #282
- Use drupal/core instead of drupal/drupal in examples by @geerlingguy in #304
- Add support for Composer version 2 by @Ayesh in #309
- Add PHP 7.4 to Travis build matrix by @kdambekalns in #328
- Fix Travis config linter warnings by @kdambekalns in #327
- Fixes #359: COMPOSER_EXIT_ON_PATCH_FAILURE doesn't do anything by @grasmash in #360
- Add support for Promises being returned by uninstall in Composer 2.1 by @Seldaek in #364
- Add note about installing
patchby @afilina in #379 - Fix for outdated patch version on FreeBSD by @pesc in #334
- Add a method to tell if a package has been patched by @phenaproxima in #392
- Add automated tests, require PHP 8 by @danepowell in #428
- Fix automated tests by @danepowell in #429
- Add installedPatches property to fix PHP 8.2 deprecation by @shyim in #409
- Fix #408: Support proxies by @skyred in #440
- Bump codeception/module-cli from 2.0.0 to 2.0.1 by @dependabot[bot] in #438
- Automatically merge dependency updates by @danepowell in #442
- Bump composer/composer from 2.5.0 to 2.5.1 by @dependabot[bot] in #430
- Bump phpro/grumphp from 1.14.0 to 1.15.0 by @dependabot[bot] in #431
- Issue #433 - Codeception configuration by @Sweetchuck in #434
- Increase test coverage for Resolvers\PatchesFile by @fredden in #381
- Bump composer/composer from 2.5.1 to 2.5.2 by @dependabot[bot] in #448
- How to store links to issues in patch description by @MurzNN in #419
- 2.x WIP (don't merge yet) by @cweagans in #447
- Add funding.yml by @cweagans in #449
- Add test coverage for command provider by @cweagans in #450
- Add project-specific depth settings by @cweagans in #452
- Run all patchers in verbose mode by @cweagans in #454
- Add --dry-run to patchers by @cweagans in #455
- GitHub configuration updates by @cweagans in #456
- Add docs feedback template by @cweagans in #457
- Tweak template by @cweagans in #458
- Placeholder docs by @cweagans in #459
- Add some docs by @cweagans in #460
- Docs 3 by @cweagans in #461
- DRY up debug output by @cweagans in #462
- Add doctor command by @cweagans in #463
- fix status output by @cweagans in #464
- Docs 4 by @cweagans in #465
- more docs by @cweagans in #466
- fix title by @cweagans in #467
- Upgrade composer configurable plugin by @cweagans in #468
- Add composer and io to all events + emit event before throwing exception when patch does not apply by @cweagans in #470
- Bump composer/composer from 2.5.2 to 2.5.3 by @dependabot[bot] in #473
- Couple of small cleanups by @cweagans in #476
- Only have git patchers and freeform patcher? by @cweagans in #472
- Add new patcher: git 'init' patcher by @cweagans in #471
- Fix typo on docs homepage by @anotherjames in #481
- Bump composer/composer from 2.5.3 to 2.5.4 by @dependabot[bot] in #483
- Issue #486 - Fix syntax errors and indentations in JSON examples by @Sweetchuck in #487
- Bump squizlabs/php_codesniffer from 3.7.1 to 3.7.2 by @dependabot[bot] in #488
- Rename patches.lock to patches.lock.json by @cweagans in #492
- Misc updates by @cweagans in #494
- Bump actions/checkout from 2 to 3 by @dependabot[bot] in #497
- Deduplicate patch collection as patches are added by @cweagans in #496
- Handle $COMPOSER environment variable by @cweagans in #493
- Bump composer/composer from 2.5.4 to 2.5.5 by @dependabot[bot] in #501
- Bump guzzlehttp/psr7 from 2.4.3 to 2.5.0 by @dependabot[bot] in #508
- Fix typo by @pepijnolivier in #504
- Bump phpro/grumphp from 1.15.0 to 1.16.0 by @dependabot[bot] in #509
- Bump composer/composer from 2.5.5 to 2.5.7 by @dependabot[bot] in #513
- Bump composer/composer from 2.5.7 to 2.5.8 by @dependabot[bot] in #515
- Bump php-coveralls/php-coveralls from 2.5.3 to 2.6.0 by @dependabot[bot] in #520
- Bump composer/composer from 2.5.8 to 2.6.2 by @dependabot[bot] in #523
- Bump actions/checkout from 3 to 4 by @dependabot[bot] in #524
- Bump composer/composer from 2.6.2 to 2.6.3 by @dependabot[bot] in #526
- Bump composer/composer from 2.6.3 to 2.6.4 by @dependabot[bot] in #527
- Bump composer/composer from 2.6.4 to 2.6.5 by @dependabot[bot] in #529
- Bump actions/github-script from 6 to 7 by @dependabot[bot] in #531
- Bump php-coveralls/php-coveralls from 2.6.0 to 2.7.0 by @dependabot[bot] in #532
- Bump composer/composer from 2.6.5 to 2.6.6 by @dependabot[bot] in #535
- Bump squizlabs/php_codesniffer from 3.7.2 to 3.8.0 by @dependabot[bot] in #536
- Bump squizlabs/php_codesniffer from 3.8.0 to 3.8.1 by @dependabot[bot] in #539
- Bump composer/composer from 2.6.6 to 2.7.0 by @dependabot[bot] in #544
- Bump composer/composer from 2.7.0 to 2.7.1 by @dependabot[bot] in #545
- Dependency patch resolution by @cweagans in #547
- Bump squizlabs/php_codesniffer from 3.8.1 to 3.9.0 by @dependabot[bot] in #552
- Add PHP 8.3 by @cweagans in #554
- Bump ramsey/composer-install from 2 to 3 by @dependabot[bot] in #555
- Bump composer/composer from 2.7.1 to 2.7.2 by @dependabot[bot] in #556
- Add information about enabling verbose output by @cweagans in #558
- Bump php-parallel-lint/php-parallel-lint from 1.3.2 to 1.4.0 by @dependabot[bot] in #565
- Bump squizlabs/php_codesniffer from 3.9.0 to 3.9.1 by @dependabot[bot] in #566
- Bump composer/composer from 2.7.2 to 2.7.3 by @dependabot[bot] in #570
- Bump composer/composer from 2.7.3 to 2.7.4 by @dependabot[bot] in #571
- Bump squizlabs/php_codesniffer from 3.9.1 to 3.9.2 by @dependabot[bot] in #572
- Bump composer/composer from 2.7.4 to 2.7.6 by @dependabot[bot] in #574
- Bump squizlabs/php_codesniffer from 3.9.2 to 3.10.0 by @dependabot[bot] in #576
- Bump squizlabs/php_codesniffer from 3.10.0 to 3.10.1 by @dependabot[bot] in #577
- Bump composer/composer from 2.7.6 to 2.7.7 by @dependabot[bot] in #580
- Bump squizlabs/php_codesniffer from 3.10.1 to 3.10.2 by @dependabot[bot] in #587
- Bump composer/composer from 2.7.7 to 2.7.8 by @dependabot[bot] in #589
- Bump composer/composer from 2.7.8 to 2.7.9 by @dependabot[bot] in #590
- Bump squizlabs/php_codesniffer from 3.10.2 to 3.10.3 by @dependabot[bot] in #593
- Bump composer/composer from 2.7.9 to 2.8.0 by @dependabot[bot] in #594
- Bump composer/composer from 2.8.0 to 2.8.1 by @dependabot[bot] in #595
- Bump composer/composer from 2.8.1 to 2.8.2 by @dependabot[bot] in #597
- Bump symfony/process from 5.4.45 to 5.4.46 by @dependabot[bot] in #600
- Bump squizlabs/php_codesniffer from 3.10.3 to 3.11.0 by @dependabot[bot] in #602
- Bump squizlabs/php_codesniffer from 3.11.0 to 3.11.1 by @dependabot[bot] in #604
- Bump composer/composer from 2.8.2 to 2.8.4 by @dependabot[bot] in #606
- Bump squizlabs/php_codesniffer from 3.11.1 to 3.11.2 by @dependabot[bot] in #607
- Patching fails when --no-cache is passed by @cweagans in
Note truncated.
-
2.0.0-beta214 Feb 2024 pre-releaseRelease notes
Open source →What's Changed
- Bump php-coveralls/php-coveralls from 2.5.3 to 2.6.0 by @dependabot in #520
- Bump composer/composer from 2.5.8 to 2.6.2 by @dependabot in #523
- Bump actions/checkout from 3 to 4 by @dependabot in #524
- Bump composer/composer from 2.6.2 to 2.6.3 by @dependabot in #526
- Bump composer/composer from 2.6.3 to 2.6.4 by @dependabot in #527
- Bump composer/composer from 2.6.4 to 2.6.5 by @dependabot in #529
- Bump actions/github-script from 6 to 7 by @dependabot in #531
- Bump php-coveralls/php-coveralls from 2.6.0 to 2.7.0 by @dependabot in #532
- Bump composer/composer from 2.6.5 to 2.6.6 by @dependabot in #535
- Bump squizlabs/php_codesniffer from 3.7.2 to 3.8.0 by @dependabot in #536
- Bump squizlabs/php_codesniffer from 3.8.0 to 3.8.1 by @dependabot in #539
- Bump composer/composer from 2.6.6 to 2.7.0 by @dependabot in #544
- Bump composer/composer from 2.7.0 to 2.7.1 by @dependabot in #545
- Dependency patch resolution by @cweagans in #547
Full Changelog: 2.0.0-beta1...2.0.0-beta2
-
2.0.0-beta101 Jul 2023 pre-releaseRelease notes
Open source →What's Changed
A lot of work went into this release. Below are all of the PRs that went into this release, but it might be more straightforward to read the new documentation. The 2.0.0 release will definitely work a little differently than you're used to if you've been using the 1.x releases.
- Readme: fix code highlighting by @TomasVotruba in #87
- Only show debugging info when using the verbose option by @pfrenssen in #90
- Use system tmp dir - fixes #89 by @erik-seifert in #96
- Document composer.json patching alternatives by @iamEAP in #97
- Introduce "composer-exit-on-patch-failure" config option. by @Leksat in #46
- Fixes #38: Multiple packages using the same patch throws an array to string exception. by @grasmash in #92
- Renamed variable, which is accidentally modified while ignoring patches by @DevinCarlson in #103
- Fix short array syntax in Patches.php:157 by @echernyavskiy in #94
- Remove GIT_DIR by @david-garcia-garcia in #104
- Use --git-dir instead of GIT_DIR env variable by @daften in #108
- Fix duplicate entries after failed patch. by @LionsAd in #143
- Add switch to $patch_levels for Magento 2 Official Patches by @navarr in #136
- Don't return too early before gathering patches of dependencies by @QuingKhaos in #151
- Increase post install/update handler priority to support other plugins by @mmenozzi in #153
- Revamp testing framework by @cweagans in #162
- Exit on patch failure should use composer extra, not localPackage by @kdebisschop in #166
- Fixes #148: Incompatible with Git 2.14+. by @danepowell in #165
- Use cweagans/composer-configurable-plugin by @cweagans in #164
- Add a patch value object + support a more verbose patch format by @cweagans in #211
- Split out patch resolution into Composer Capabilities by @cweagans in #212
- Remove patch report generation by @cweagans in #213
- Make sure that Patch and PatchCollection objects can be correctly serialized/deserialized by @cweagans in #214
- Add missing ext-json in composer.json. by @drupol in #248
- Use strict comparison. by @drupol in #249
- Add contributing section to readme. by @ElijahLynn in #264
- Use empty() instead of isset() to check for empty arrays in RootComposer (test coverage 100%) by @ElijahLynn in #265
- Remove dependency patch resolution by @cweagans in #267
- [docs] Fix grumphp command in readme. by @ElijahLynn in #269
- Retry failed downloads once by @Berdir in #282
- Use drupal/core instead of drupal/drupal in examples by @geerlingguy in #304
- Add support for Composer version 2 by @Ayesh in #309
- Add PHP 7.4 to Travis build matrix by @kdambekalns in #328
- Fix Travis config linter warnings by @kdambekalns in #327
- Fixes #359: COMPOSER_EXIT_ON_PATCH_FAILURE doesn't do anything by @grasmash in #360
- Add support for Promises being returned by uninstall in Composer 2.1 by @Seldaek in #364
- Add note about installing
patchby @afilina in #379 - Fix for outdated patch version on FreeBSD by @pesc in #334
- Add a method to tell if a package has been patched by @phenaproxima in #392
- Add automated tests, require PHP 8 by @danepowell in #428
- Fix automated tests by @danepowell in #429
- Add installedPatches property to fix PHP 8.2 deprecation by @shyim in #409
- Fix #408: Support proxies by @skyred in #440
- Bump codeception/module-cli from 2.0.0 to 2.0.1 by @dependabot in #438
- Automatically merge dependency updates by @danepowell in #442
- Bump composer/composer from 2.5.0 to 2.5.1 by @dependabot in #430
- Bump phpro/grumphp from 1.14.0 to 1.15.0 by @dependabot in #431
- Issue #433 - Codeception configuration by @Sweetchuck in #434
- Increase test coverage for Resolvers\PatchesFile by @fredden in #381
- Bump composer/composer from 2.5.1 to 2.5.2 by @dependabot in #448
- How to store links to issues in patch description by @MurzNN in #419
- 2.x WIP (don't merge yet) by @cweagans in #447
- Add funding.yml by @cweagans in #449
- Add test coverage for command provider by @cweagans in #450
- Add project-specific depth settings by @cweagans in #452
- Run all patchers in verbose mode by @cweagans in #454
- Add --dry-run to patchers by @cweagans in #455
- GitHub configuration updates by @cweagans in #456
- Add docs feedback template by @cweagans in #457
- Tweak template by @cweagans in #458
- Placeholder docs by @cweagans in #459
- Add some docs by @cweagans in #460
- Docs 3 by @cweagans in #461
- DRY up debug output by @cweagans in #462
- Add doctor command by @cweagans in #463
- fix status output by @cweagans in #464
- Docs 4 by @cweagans in #465
- more docs by @cweagans in #466
- fix title by @cweagans in #467
- Upgrade composer configurable plugin by @cweagans in #468
- Add composer and io to all events + emit event before throwing exception when patch does not apply by @cweagans in #470
- Bump composer/composer from 2.5.2 to 2.5.3 by @dependabot in #473
- Couple of small cleanups by @cweagans in #476
- Only have git patchers and freeform patcher? by @cweagans in #472
- Add new patcher: git 'init' patcher by @cweagans in #471
- Fix typo on docs homepage by @anotherjames in #481
- Bump composer/composer from 2.5.3 to 2.5.4 by @dependabot in #483
- Issue #486 - Fix syntax errors and indentations in JSON examples by @Sweetchuck in #487
- Bump squizlabs/php_codesniffer from 3.7.1 to 3.7.2 by @dependabot in #488
- Rename patches.lock to patches.lock.json by @cweagans in #492
- Misc updates by @cweagans in #494
- Bump actions/checkout from 2 to 3 by @dependabot in #497
- Deduplicate patch collection as patches are added by @cweagans in #496
- Handle $COMPOSER environment variable by @cweagans in #493
- Bump composer/composer from 2.5.4 to 2.5.5 by @dependabot in #501
- Bump guzzlehttp/psr7 from 2.4.3 to 2.5.0 by @dependabot in #508
- Fix typo by @pepijnolivier in #504
- Bump phpro/grumphp from 1.15.0 to 1.16.0 by @dependabot in #509
- Bump composer/composer from 2.5.5 to 2.5.7 by @dependabot in #513
- Bump composer/composer from 2.5.7 to 2.5.8 by @dependabot in #515
New Contributors
- @TomasVotruba made their first contribution in #87
- @erik-seifert made their first contribution in #96
- @iamEAP made their first contribution in #97
- @Leksat made their first contribution in #46
- @grasmash made their first contribution in #92
- @DevinCarlson made their first contribution in #103
- @echernyavskiy made their first contribution in #94
- @david-garcia-garcia made their first contribution in #104
- @daften made their first contribution in #108
- @navarr made their first contribution in #136
- @QuingKhaos made their first contribution in #151
- @mmenozzi made their first contribution in #153
- @kdebisschop made their first contribution in #166
- @drupol made their first contribution in #248
- @ElijahLynn made their first contribution in #264
- @geerlingguy made their first contribution in #304
- @Ayesh made their first contribution in #309
- @kdambekalns made their first contribution in #328
- @afilina made their first contribution in #379
- @pesc made their first contribution in #334
- @shyim made their first contribution in #409
- @skyred made their first contribution in #440
- @dependabot made their first contribution in #438
- @Sweetchuck made their first contribution in #434
- @MurzNN made their first contribution in #419
- @anotherjames made their first contribution in #481
- @pepijnolivier made their first contribution in
Note truncated.
-
1.7.320 Dec 2022Release notes
Open source →What's Changed
- Add installedPatches property to fix PHP 8.2 deprecation 1.x version by @seamuslee001 in #422
New Contributors
- @seamuslee001 made their first contribution in #422
Full Changelog: 1.7.2...1.7.3
-
1.7.225 Jan 2022 -
1.7.108 Jun 2021Nothing published for this version
-
1.7.030 Sep 2020 -
1.6.729 Aug 2019Release notes
Open source →Retry failed downloads to work around some Drupal.org infrastructure hiccups
-
1.6.624 Oct 2018Release notes
Open source →- Readme fixups
- PHP 5.3 compatibility fix
- Resolves some array to string conversion errors
- Check that a package actually has patches before uninstalling/reinstalling
-
1.6.511 May 2018Release notes
Open source →- Allow patch-level to be specified per-project
- Handle patches-ignore when re-patching
-
1.6.407 Dec 2017Nothing published for this version
-
1.6.322 Nov 2017Nothing published for this version
-
1.6.230 Aug 2017Nothing published for this version
-
1.6.119 Mar 2017Nothing published for this version
-
1.6.001 Dec 2016Nothing published for this version
-
1.5.028 Mar 2016Nothing published for this version
-
1.4.029 Feb 2016Nothing published for this version
-
1.3.009 Jul 2015Nothing published for this version
-
1.2.015 May 2015Nothing published for this version
-
1.1.027 Apr 2015Nothing published for this version
-
1.0.022 Apr 2015Nothing published for this version