-
-
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
Add a patches-import
subcommand as a way to support discovering patches from dependencies
#546
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! |
How can we exclude all patches from dependency X or just some of them? I assume the generated "patch collection file" could be modified manually but on the next run
Maybe a Maybe it is also worth collecting user-story-like scenario descriptions that would detail how these commands could/should be leveraged when:
|
An additional configuration directive could be added to ignore patches from specific dependencies. I don't think I'd be interested in ignoring specific patches from specific dependencies (the workaround being to ignore the entire dependency and manage the patches in the root project manually).
Since the
I specifically do not want this to be an automatic thing by default. If people want to add this to their That said, I can add some stuff to the Recommended Workflows docs for users that need something a little more prescriptive. |
Actually. Ignore this entire issue. |
Verification
composer self-update
)composer update cweagans/composer-patches
)Is your feature request related to a problem?
Right now, including patches from dependencies isn't a supported workflow. Many users rely on this functionality.
Describe your proposed solution(s)
Let's add a subcommand to this project that looks through all
composer.json
files in the project and imports all of the patch definitions into a root-levelpatches.json
. We'll need some way to differentiate between user-added patches and patches defined by a dependency. If the command is re-run, any updated patches from dependencies should be re-discovered. It might make sense to make this a separate patches file.This removes a ton of the complexity around discovering and applying patches from dependencies and is a workflow that I might be willing to support in the long term.
The workflow would be roughly as follows:
composer install
- get all of the dependencies on diskcomposer patches-import
- crawl through all of thecomposer.json
files, grab patch defs, and add them to a patches filecomposer patches-relock
- re-generate the patches lock filecomposer patches-repatch
- remove and re-patch installed dependenciesTo composer patches, this would just look like you defined the patches by hand. The only real difference is that there would be a helper command that you can run separately from
composer install
.Describe alternatives
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: