Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid conflicts with other patch applier plugins #66

Open
allanpaiste opened this issue Feb 5, 2021 · 0 comments
Open

Avoid conflicts with other patch applier plugins #66

allanpaiste opened this issue Feb 5, 2021 · 0 comments

Comments

@allanpaiste
Copy link
Contributor

allanpaiste commented Feb 5, 2021

Is your feature request related to a problem? Please describe.

The plugin clashes with other Composer plugins that deal with similar topic - making it unviable to use the module as dependency.

The issue comes from using general extra.patches for the patches reference (patches-search is fine though).

Describe the solution you'd like

Add configuration option on package-level where the plugin would only deal with applying patches from the packages that use it as dependency. When the plugin is not required by project root and all of the packages claim exclusive usage of the patcher, avoid applying patches from anywhere else.

In short, this would mean that the patch applier would only work against modules that directly, explicitly require it.

Additionally: output a warning when other plugins with same purpose present in a project. In that case allow the more focused functionality to be enabled via ROOT package configuration.

Describe alternatives you've considered

Another alternative would be just to warn the user and not provide any way to continue which would just be more inconvenient.

Yet another would be to switch the configuration keys for patch definition to completely new keys.

or ... allow the patches owner package to define they key from where the patches are read from.

@allanpaiste allanpaiste added this to the 3.54.0 / 4.23.0 milestone Feb 24, 2021
johnorourke added a commit to getjohn/composer-patches that referenced this issue Feb 24, 2022
A partial solution for vaimo#66 - both modules use `extra.patches` but with different syntax, so if one module is installed and in use, and the other gets installed, unpredictable behaviour results without clear warnings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant