composer-patches
composer-patches copied to clipboard
Allow for wildcard in patcher search
Is your feature request related to a problem? Please describe. In an attempt to keep everything in modules it would be nice to have wildcards work in the search configuration settings. This would allow us to keep the patches in the relevant module without having to add every single module path to the search lising
Describe the solution you'd like Accepting wildcards in the search configuration
"extra": {
"patcher": {
"search": ["patches", "app/code/<vendor>/*/patches", "vendor/<vendor>/*/patches"]
}
}
Describe alternatives you've considered manually adding the path per module (which is what i'll do for the time being).
My guess is if we add glob around this line and merge it with the paths glob patterns could work https://github.com/vaimo/composer-patches/blob/aba4a6bac8d5bbb44facf2f47ec6e5d5e13c8445/src/Patch/SourceLoaders/PatchesSearch.php#L101
@indykoning you are correct. I'd be easy to implement as well + would make it more in tune with some other features that do allow wildcards to be used. Will look into this asap.