This composer plugin extends the cweagans/composer-patches plugin to allow
patches to be applied to packages when composer is in dev mode (without
--no-dev
passed composer install
or composer update
). This is useful to
patch certain packages locally and not in a production environment.
$ composer require nathandentzau/composer-patches-dev
Add a patches-dev
definition to either the extras
array in composer.json
or in a specified external patch file.
Run composer install or update without the --no-dev
flag.
$ composer install
or
$ composer update
Run composer install or update with the --no-dev
flag.
$ composer install --no-dev
or
$ composer update --no-dev
{
"name": "nathandentzau/composer-patches-dev-test",
"description": "A test project for nathandentzau/composer-patches-dev",
"type": "project",
"license": "MIT",
"authors": [
{
"name": "Nathan Dentzau",
"email": "[email protected]"
}
],
"require": {
"drupal/core": "8.5.0"
},
"require-dev": {
"nathandentzau/composer-patches-dev": "^1.0"
},
"extra": {
"patches-dev": {
"drupal/core": {
"Suppress filesystem errors with BindFS in Drupal core": "https://gist.githubusercontent.com/nathandentzau/355f3476b13cab38294ebc0207cedac0/raw/25c312a2814a7d62c812796c91099a091972b37c/suppress-filesystem-errors-with-bindfs-in-drupal-core.patch"
}
}
}
}
Please refer to the error handling documentation for cweagans/composer-patches.
The cweagans/composer-patches plugin is on a feature freeze for its current stable version. The next version is actively being worked on by its maintainer. This feature will be merged into version 2.x of composer-patches when the time is right. After that this package will be discontinued.