composer-patches
composer-patches copied to clipboard
Report missing packages where patches exist (due to typo in patch package name for example)
I've noticed a couple of times where a typo in the patches file meant patches weren't applied at all. Usually you pick it up straight away but I can see it could slip through and you'd not know until you test the impact of the patch.
This adds a last check after install to check for any patches that weren't applied because their package was not installed, and reports it to the console. If exit-on-failure is enabled it will also fail the install (as this is no different to an invalid patch).
It only works at the root level so won't report missing packages that nested dependencies are trying to patch (since the owner of the root package is unlikely to be able to fix it if it did.)
Happy to add the same to the new 2.x branch - I avoided initially as I can see checkPatches
is disabled so it's likely not ready yet so would be hard to test - maybe when it's ready I can do the same PR.
Hi @cweagans I will have some time to work on this further if there's some bits that need improving. Would be great to hear back. Thanks!
@cweagans Do you think this might be looked at soon? Thanks.
I've made a note to include this in #447.
@cweagans Thanks! Would be great to cherry pick and adjust 😄