Update on dependency patch resolution
In my last post, I talked about removing dependency patch resolution in Composer Patches 2.0.0, why it was necessary, and what the next steps were.
In the seven months since then, I’ve been actively soliciting feedback from larger projects that use Composer Patches (thank you to those of you who responded with your input!). Predictably, the common problem that was holding people back from trying the beta release was the lack of dependency patch resolution. Because of this, I spent some time trying to come up with some way to achieve the same end result without the major headache that the previous implementation of this functionality represented.
My first idea was to write a new Composer command (something along the lines of composer patches-import
) that would generate a patches.json
from the contents of all dependencies’ composer.json
files. I even started implementing this, but it turned out that I would have to duplicate a ton of code to make this work.
The end result was a pull request to re-add dependency patch resolution to Composer Patches. The new implementation works just like you’d expect and (as far as I can tell) is backwards compatible with 1.x.
For your convenience, I have tagged Composer Patches 2.0.0-beta2. Please test this in your projects and let me know how it goes. I’d like to tag 2.0.0 within the next 90 days, so your feedback is critical.
To test this in your projects, you can run this:
composer require cweagans/composer-patches:"2.0.0-beta2 as 1.7"
If you encounter any issues, please open an issue or start a discussion in the Composer Patches project. I’m happy to help with anything that you run into.