- Issue created by @pcambra
- First commit to issue fork.
- Status changed to Needs review
2 months ago 5:57am 15 April 2025 - π«π·France johnatas
@kiseleva.t,
You can use MRs in Composer as well. To do so, simply add ".patch" at the end of the MR URL.
Example:"drupal/node_revision_delete": { "#3500347 - Nullable types must be explicit": "https://git.drupalcode.org/project/node_revision_delete/-/merge_requests/32.patch" }
Note that I tested MR !31 on Drupal 11.2 and it works correctly.
- πͺπΈSpain pcambra Asturies
Careful with the approach above, as the patch is associated to the MR so it will change over time. See https://architecture.lullabot.com/adr/20220429-composer-patch-files/
- π«π·France johnatas
Thank you @pcambra for the clarification β it's true that I didnβt add a disclaimer about the approach I mentioned.
It should indeed be used with caution.
On my side, Iβve been using it for open MRs (even RTBC ones) for a long time without changes (but still not merged), while having tests run at every composer install (which can indeed break something if the MR has changed).
For greater peace of mind, itβs definitely better to use a local copy of the patch (which can be generated with the approach I mentioned).