cweagans / composer-patches

Simple patches plugin for Composer
https://www.cweagans.net/project/composer-patches
BSD 3-Clause "New" or "Revised" License
1.53k stars 240 forks source link

Support multiple patches-files or patches-file with root patches together #581

Closed sascha-meissner closed 5 months ago

sascha-meissner commented 5 months ago

Verification

Is your feature request related to a problem?

Currently you can either choose to have one patches-file containing the patches OR having the patches in the root composer json,

if you try to use:

        "patches": {
            "some/package": {
                "do-this-and-that": "path/to/my.patch"
            }
        },
        "patches-file": "composer.patches.json"

it will ignore the patches-file no matter the order.

BUT it would be a very nice feature to have multiple patch-sources, in example to have a centralized patchmanagement and still have the possibility to have exotic project-specific patches only in the project and not in the central.

Describe your proposed solution(s)

Either support multiple patchfiles, in example:

"patches-file": ["upstream.patches.json", "custom.patches.json"]

which would be the desired solution

Describe alternatives

for our use case two-dimensional approach would also work in example when having

        "patches": {
            "some/package": {
                "do-this-and-that": "path/to/my.patch"
            }
        },
        "patches-file": "composer.patches.json"

that both, the patches in root composer json will be applied as well as the patches in patches file

Additional context

No response

github-actions[bot] commented 5 months ago

👋 Thanks for the idea! Please remember that this is an open source project - feature requests may or may not be implemented, and if they are, the timeline is unknown. If you need a guaranteed implementation or timeline, sponsorships are welcome!

sascha-meissner commented 5 months ago

I´m sorry i didnt find https://github.com/cweagans/composer-patches/issues/139 in the first place, this issue here should be a duplicate

cweagans commented 5 months ago

2.x does what you want :)