Download the PHP package netresearch/composer-patches-plugin without Composer
On this page you can find all versions of the php package netresearch/composer-patches-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download netresearch/composer-patches-plugin
More information about netresearch/composer-patches-plugin
Files in netresearch/composer-patches-plugin
Package composer-patches-plugin
Short Description Composer patches plugin
License GPL-2.0
Informations about the package composer-patches-plugin
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
See this presentation for the original idea of this plugin: http://de.slideshare.net/christianopitz/distributed-patching-with-composer
Patch properties
Key | Description | Required |
---|---|---|
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 thrown |
You may provide patches per package and optionally by version constraints:
Provide patches by package only
Provide patches by package and versions or version constraints
composer.json:
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
You can put any part of the patches object into another JSON and load it via an URL (or a path):
composer.json:
http://example.com/typo3-patches.json
Provide patches from local stored files
You can use absolute paths or paths relative to the application root.
composer.json:
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:
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:
Requiring the patches:
just require the package with the patches.