-
-
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
[Bug or new feature] Add support for local patch files and external patch file in dependencies #505
Comments
👋 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! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Automatically closing doesn't seem right to me. It would be nice to see a response acknowledging or declining the ticket |
I agree, perhaps the staleness threshold has been set to low, at one month? It seems very fast ... |
Hi all, apologies for the quick close and radio silence. I was trying out the stale bot and the thresholds were indeed set too low. At this point, the 2.x version isn't going to support importing patches/patch defs from dependencies. It's a pretty complicated problem and an endless source of support requests and bugs. I do not have the time or energy to devote to it and I just can't commit to maintaining that particular functionality right now. If you feel very strongly about having this kind of workflow (and being able to define patches via imported dependencies in general), I'd be glad to help you start up a plugin that extends this one and get you pointed in the right direction and give you an early heads up on where you might run into complications. |
@cweagans thanks for the reply. |
I'm never going to turn down help with docs! 😄 Couple of potentially helpful tidbits:
|
@cweagans I've created a PR to extend the documentation based on the info I reported here. I think the description is quite extensive, feel free to edit/reduce the text if you feel it's too much. |
Thanks! I'll take a look ASAP. |
Verification
composer self-update
)composer update cweagans/composer-patches
)Is your feature request related to a problem?
Yes, a patch will not be applied from one of the packages I'm installing (my own package).
Setup:
issue 1
When dependency 1 uses an external patch file the patches are not detected and thus never applied.
gatherPatches only searches for the
patches
key.issue 2
When switching to the
patches
configuration the patch will be found but when it's not an url but a local path e.g.patches/my-patch.patch
an error occurs because paths are only resolved relative to the root directory.My current workaround is adding a symlink in my root project.
Describe your proposed solution(s)
Add support for the
patches-file
configuration for dependencies and use dependency/package root that defines a patch to resolve relative paths for patches.Describe alternatives
Add documentation that an external patch file only works for root projects (although this does not make a lot of sense to me).
To resolve the relative path issue an alternative could be to copy all gathered patches into a temp dir.
Additional context
No response
The text was updated successfully, but these errors were encountered: