-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Remove dependency patch resolution #267
Conversation
46a9089
to
c32d533
Compare
@@ -540,9 +565,45 @@ public function fail($message) { | |||
* | |||
* @param $exception string or \Exception | |||
* @param $callback | |||
* | |||
* @deprecated Use expectThrowable instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this valid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's generated code from codeception.
👍 |
@cweagans Any news when this will be released with an official version because I think it is rather important 😄 |
@AndreasA I had to look twice to realise that this PR removes support for resolving the path to patches in dependencies. From what I believe I see in current composer:
The change in this PR (merged April 2019) |
@xurizaemon from what I can see the commit was merged forever ago but not yet included in a released version of the package which is weird. Personally, I think it makes more sense to specify all patches in the root only, to avoid weird side-effects and confusion. |
@xurizaemon I have now checked the code for v1.x and according to this code line https://github.com/cweagans/composer-patches/blob/1.7.2/src/Patches.php#L436 |
This pr only affects the 2.x release, which has no specific release date nor timeline. This will not be added to 1.x. |
This is something that I've wanted to do for a while, but we haven't had the infrastructure to let people add it on to the plugin if they really need this functionality. I was hesitant to add it in the first place, because allowing some arbitrary package to patch another has some security risks associated with it (imagine some contrib module just nuking the entire filter module in drupal/core).
Since PatchResolvers are now Composer Capabilities, this plugin can be extended by another plugin. I'm happy to help someone build out their own plugin to provide this functionality if there's strong enough interest. There is also some movement toward making patch application a Capability, so a third party plugin will be able to handle transforming the path to the patch file appropriately (to address issues like #39).
From a maintenance burden standpoint, this functionality has probably been one of the more difficult parts of the plugin. Aside from the security risks, it's been pretty error prone, and there are a ton of instances where multiple modules require the same patch (which causes problems - can't apply the same patch twice, the internal data structure doesn't really tolerate duplicate patches that well, etc).