Repository navigation
Using the patches
Written against v1.6.1.
This page takes a consumer repository from nothing to a Composer install that applies the patches in this package. At the end, vendor/pestphp/pest-plugin-mutate carries every patch listed on Patches.
The package is read from GitHub with a vcs repository, not from Packagist, and the install commands are in the README rather than copied here. The steps below say where each one goes.
-
List the repository in the root
composer.json. Composer readsrepositoriesonly from the root project, so a package that another repository installs still needs its entry in the root of the project being installed. -
Require the package. An application requires it in
require, becausecweagans/composer-patches2.x applies a dependency's patches only frompackagesincomposer.lock. A package that another repository installs requires it with--devand lists the patch files in its own rootpatches.json. -
Install. The package pins
pestphp/pest-plugin-mutateto exactly5.0.2, so the install resolves to that release. -
Check that the patches applied. Each patch is a file under
vendor/uams-web/patches-pest-plugin-mutate/patches/, and Patches names the upstream files each one changes. Reading those files undervendor/pestphp/pest-plugin-mutate/src/confirms the result.
Note: patch paths start vendor/uams-web/patches-pest-plugin-mutate/patches/, so a consumer with a non-default vendor-dir is not covered.
The full procedure for moving an existing consumer onto the package, including composer patches-relock and composer patches-repatch, is the upstream-patch-lifecycle skill's Moving a consumer to the package, delivered to each consumer repository.
A consumer needs no test of its own that asserts a patch is present in vendor/: this repository's check fails when a patch stops applying to the pin, and for the patches it drives, when one stops changing behavior. See Verifying the set.
Reference: Patches, Versioning. If an install fails, see Troubleshooting.
Home | Using the patches | Patches | Versioning | Verifying the set | Adding or retiring a patch | Troubleshooting | README | Repository
Written against v1.6.1. Edit these pages in docs/wiki/ through a pull request; edits made here are overwritten on the next publish.
Getting started
Reference
Maintaining the package
Troubleshooting
Project