PHPackages                             nuonic/composer-patches-plugin - 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. nuonic/composer-patches-plugin

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

nuonic/composer-patches-plugin
==============================

Composer patches plugin

1.0.0(2y ago)015GPL-2.0PHP

Since May 17Pushed 1y agoCompare

[ Source](https://github.com/nuonic-digital/composer-patches-plugin)[ Packagist](https://packagist.org/packages/nuonic/composer-patches-plugin)[ RSS](/packages/nuonic-composer-patches-plugin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

composer-patches-plugin
=======================

[](#composer-patches-plugin)

> This plugin is based on the netresearch/composer-patches-plugin

This plugin allows you to provide patches for any package from any package.

If you don't want a patch package outside the root package, consider providing it as package in the [repositories key](https://getcomposer.org/doc/04-schema.md#repositories)

```
{
    "name": "vendor/package",
    "type": "project",
    "repositories": [
        {
            "type": "package",
            "package": {
                "type": "metapackage",
                "name": "vendor/package-patches",
                "version": "1.0.0",
                "require": {
                    "nuonic/composer-patches-plugin": "~1.0"
                },
                "extra": {
                    "patches": {
                        "vendor/name": [
                            {
                                "url": "https://my-domain.com/path/to/my.patch"
                            }
                        ]
                    }
                }
            }
        }
    ],
    "require": {
        "vendor/package-patches": "~1.0"
    }
}
```

See this presentation for the original idea of this plugin:

Patch properties
----------------

[](#patch-properties)

KeyDescriptionRequired`url`The url or path to the patch✓`title`Title to display when applying or reverting the patch`args`string, which will be added to the patch command`sha1`SHA1 checksum of the patch contents for security check - when given the patches actual checksum and this value are compared and if they don't match an exception will be thrownYou may provide patches per package and optionally by version constraints:

Provide patches by package only
-------------------------------

[](#provide-patches-by-package-only)

```
{
    "name": "nuonic/typo3-patches",
    "version": "1.0.0",
    "type": "metapackage",
    "require": {
        "nuonic/composer-patches-plugin": "~1.0"
    },
    "extra": {
        "patches": {
            "typo3/cms": [
                {
                    "title": "[FEATURE] Allow registration of different login forms",
                    "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/32f331fead9c7aa50d9248c54e3c0af75d793539"
                },
                {
                    "title": "[PATCH] [BUGFIX] Flexform \"required\" on input fields applies to last field only",
                    "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/a48f8b0dae11ce7246eff43132d986bccf55b786"
                }
            ]
        }
    }
}
```

Provide patches by package and versions or version constraints
--------------------------------------------------------------

[](#provide-patches-by-package-and-versions-or-version-constraints)

---

composer.json:

```
{
    "name": "nuonic/typo3-patches",
    "version": "1.0.0",
    "type": "metapackage",
    "require": {
        "nuonic/composer-patches-plugin": "~1.0"
    },
    "extra": {
        "patches": {
            "typo3/cms":     {
                "6.2.0-beta1": [
                    {
                        "title": "[FEATURE] Allow registration of different login forms",
                        "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/32f331fead9c7aa50d9248c54e3c0af75d793539"
                    },
                    {
                        "title": "[PATCH] [BUGFIX] Flexform \"required\" on input fields applies to last field only",
                        "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/a48f8b0dae11ce7246eff43132d986bccf55b786"
                    }
                ],
                "6.2.0-beta2": [
                    {
                        "title": "[PATCH] [BUGFIX] Flexform \"required\" on input fields applies to last field only",
                        "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/a48f8b0dae11ce7246eff43132d986bccf55b786"
                    }
                ],
                "6.2.*": [
                    {
                        "title": "[BUGFIX] Ignore dependencies on non typo3-cms-extension",
                        "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/9fe856ac96e6a53fef8277f36a4a80bace6f0ae9",
                        "sha1": "b56a1c47a67d1596c0bd8270e61c44f8911af425"
                    }
                ]
            }
        }
    }
}
```

**Note**: *When multiple version constraints match the version of the target package, all of the matching patches will be applied (canonicalized by theyr checksums, so no duplicates should occure).*

Provide patches from URLs or paths
----------------------------------

[](#provide-patches-from-urls-or-paths)

You can put any part of the patches object into another JSON and load it via an URL (or a path):

composer.json:

```
{
    "name": "nuonic/typo3-patches",
    "version": "1.0.0",
    "type": "metapackage",
    "require": {
        "nuonic/composer-patches-plugin": "~1.0"
    },
    "extra": {
        "patches": {
            "typo3/cms": "http://example.com/typo3-patches.json"
        }
    }
}
```

```
{
    "6.2.0-beta1": [
        {
            "title": "[FEATURE] Allow registration of different login forms",
            "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/32f331fead9c7aa50d9248c54e3c0af75d793539"
        },
        {
            "title": "[PATCH] [BUGFIX] Flexform \"required\" on input fields applies to last field only",
            "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/a48f8b0dae11ce7246eff43132d986bccf55b786"
        }
    ],
    "6.2.0-beta2": [
        {
            "title": "[PATCH] [BUGFIX] Flexform \"required\" on input fields applies to last field only",
            "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/a48f8b0dae11ce7246eff43132d986bccf55b786"
        }
    ],
    "6.2.*": [
        {
            "title": "[BUGFIX] Ignore dependencies on non typo3-cms-extension",
            "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/9fe856ac96e6a53fef8277f36a4a80bace6f0ae9",
            "sha1": "b56a1c47a67d1596c0bd8270e61c44f8911af425"
        }
    ]
}
```

Provide patches from local stored files
---------------------------------------

[](#provide-patches-from-local-stored-files)

You can use absolute paths or paths relative to the application root.

composer.json:

```
"repositories": [
        {
            "type": "package",
            "package": {
                "type": "metapackage",
                "name": "vendor/package-patches",
                "version": "1.0.0",
                "require": {
                    "nuonic/composer-patches-plugin": "~1.0"
                },
                "extra": {
                    "patches": {
                        "typo3/cms":     [
                            {
                                    "title": "[FEATURE] Allow registration of different login forms",
                                    "url": "patches/example_local_file.patch"
                            }
                        ]
                    }
                }
            }
        }
    ],
   "require": {
        ....
    },
```

I have also added a new folder at the same level as the composer.json called "patches" and add a patch file example\_local\_file.patch like:

```
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- a/src/com/zoho/crm/library/exception/Logger.php
+++ b/src/com/zoho/crm/library/exception/Logger.php
@@ -6,7 +6,7 @@
 	{
 		set_include_path(ZCRMConfigUtil::getConfigValue('applicationLogFilePath'));
 		$path=get_include_path();
-		if($path{strlen($path)-1}!='\/')
+		if($path[strlen($path)-1]!='\/')
 		{
 			$path=$path."/";
 		}

```

*Note* that the patch will be called with the option -p1 (remove the first slash) and in the directory of the library.

Then run the commands to update the dependency and to install patches:

```
composer update vendor/package-patches
composer install

```

Requiring the patches:
----------------------

[](#requiring-the-patches)

just require the package with the patches.

```
{
    "name": "nuonic/patched-typo3",
    "type": "project",
    "description": "A patched version of typo3",
    "minimum-stability": "dev",
    "require": {
        "nuonic/typo3-patches": "~1.0",
        "typo3/cms": "6.2.0-beta3"
    }
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor3

3 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

731d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6c657f789bc11db82de6c82fa69ed7a15e66ea3204ee3bef74161f0accb4b18f?d=identicon)[jankal](/maintainers/jankal)

---

Top Contributors

[![copitz](https://avatars.githubusercontent.com/u/882663?v=4)](https://github.com/copitz "copitz (15 commits)")[![CybotTM](https://avatars.githubusercontent.com/u/326348?v=4)](https://github.com/CybotTM "CybotTM (10 commits)")[![rednut](https://avatars.githubusercontent.com/u/1188531?v=4)](https://github.com/rednut "rednut (7 commits)")[![JParkinson1991](https://avatars.githubusercontent.com/u/6921398?v=4)](https://github.com/JParkinson1991 "JParkinson1991 (5 commits)")[![jankal](https://avatars.githubusercontent.com/u/6324332?v=4)](https://github.com/jankal "jankal (4 commits)")[![c33s](https://avatars.githubusercontent.com/u/649209?v=4)](https://github.com/c33s "c33s (2 commits)")[![IllyaMoskvin](https://avatars.githubusercontent.com/u/3881840?v=4)](https://github.com/IllyaMoskvin "IllyaMoskvin (1 commits)")[![kasperg](https://avatars.githubusercontent.com/u/73966?v=4)](https://github.com/kasperg "kasperg (1 commits)")[![vergissberlin](https://avatars.githubusercontent.com/u/179964?v=4)](https://github.com/vergissberlin "vergissberlin (1 commits)")[![cweiske](https://avatars.githubusercontent.com/u/59036?v=4)](https://github.com/cweiske "cweiske (1 commits)")[![dooug](https://avatars.githubusercontent.com/u/136539?v=4)](https://github.com/dooug "dooug (1 commits)")[![dudilag](https://avatars.githubusercontent.com/u/10417029?v=4)](https://github.com/dudilag "dudilag (1 commits)")[![Gitsko](https://avatars.githubusercontent.com/u/17161911?v=4)](https://github.com/Gitsko "Gitsko (1 commits)")[![igormukhingmailcom](https://avatars.githubusercontent.com/u/6544038?v=4)](https://github.com/igormukhingmailcom "igormukhingmailcom (1 commits)")

---

Tags

plugincomposerpatches

### Embed Badge

![Health badge](/badges/nuonic-composer-patches-plugin/health.svg)

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

###  Alternatives

[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k37.3M2.1k](/packages/ergebnis-composer-normalize)[netresearch/composer-patches-plugin

Composer patches plugin

80262.1k7](/packages/netresearch-composer-patches-plugin)[sllh/composer-lint

Extends the composer validate command with extra rules

14214.6k7](/packages/sllh-composer-lint)

PHPackages © 2026

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