Repository navigation
Verifying the patch set
Written against v1.0.0.
Check that every patch still applies to the upstream release it is written against, in order, and that applying it a second time fails. Run this after changing a patch, and before moving an upstream pin.
-
Clone the upstream release into an empty scratch directory.
git clone --depth 1 --branch v5.3.7 https://github.com/pestphp/pest.git package
-
Set
PATCHESto this repository'spatchesfolder. Replace the placeholder with the path to the checkout.PATCHES=/path/to/patches-pestphp-pest/patches
-
Apply each patch in the order
composer.jsonlists them.cd package git apply -p1 "$PATCHES/pestphp-pest-composer-autoload-path.patch"; echo "pestphp-pest-composer-autoload-path.patch: $?"
Each prints
0. -
Apply each one a second time. Each must fail, which shows the first run changed the code rather than finding it already patched.
git apply -p1 "$PATCHES/pestphp-pest-composer-autoload-path.patch"; echo "pestphp-pest-composer-autoload-path.patch again: $?"
Each prints
1, after an error naming the file the patch no longer applies to.
Note: apply the patches in the order composer.json lists them. A later patch is cut against the output of the earlier ones, so applying them out of order can fail even when each patch is correct.
- Patches: the upstream pins, the order, and what each patch changes.
- A patch fails to apply: what a failure in step 3 means.
Home | Guides | Troubleshooting | Reference | Project | README | Repository
Written against v1.0.0. Edit these pages in docs/wiki/ through a pull request; edits made in the wiki are overwritten by the next publish.
Getting started
Guides
Troubleshooting
Reference
Project