nathandentzau / composer-patches-dev
Apply patches to packages while Composer is in dev mode
Installs: 3 155
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 0
Type:composer-plugin
Requires
- php: >=7.1.0
- composer-plugin-api: ^1.1
- cweagans/composer-patches: ^1.6
Requires (Dev)
- composer/composer: ^1.6
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2024-10-27 08:50:05 UTC
README
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.
Installation
$ composer require nathandentzau/composer-patches-dev
Usage
Add a patches-dev
definition to either the extras
array in composer.json
or in a specified external patch file.
Applying patches defined in patches-dev
Run composer install or update without the --no-dev
flag.
$ composer install
or
$ composer update
Prevent applying patches defined in patches-dev
Run composer install or update with the --no-dev
flag.
$ composer install --no-dev
or
$ composer update --no-dev
Example: composer.json
{ "name": "nathandentzau/composer-patches-dev-test", "description": "A test project for nathandentzau/composer-patches-dev", "type": "project", "license": "MIT", "authors": [ { "name": "Nathan Dentzau", "email": "nathan.dentzau@gmail.com" } ], "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" } } } }
Error handling
Please refer to the error handling documentation for cweagans/composer-patches.
Why is this a seperate plugin?
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.