-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
2.0.0 todo list #451
Comments
For people following along at home, updated documentation is being staged at https://docs-staging.cweagans.net/composer-patches -- still very much under construction, but I'd appreciate any feedback. |
Thanks @cweagans for the awesome package and documentation! I am eagerly awaiting version 2 for the more descriptive Expanded Format for defining patch configurations. Do you anticipate v2 will have BC breakes, or we should just be able to update out configs to use the new Expanded Format and be off to the races? I notice the Expanded Format documentation here provides a thanks again :) |
First of, thank you, thank you, for working on this. This look fantastic. I was missing a section about security. Trusting external stored patches, and best practice to mitigate this. Supply chain attacks are "quite popular" and applying/trusting external patches might also be an extra attack vector to be aware of. |
Looking good, thanks! Perhaps updating the Patching projects using Composer documentation page on Drupal.org can be added to the list? It's one of the top result in search engines looking for |
@gitressa thats what brought me here as well |
Thanks for the thumbs up @cweagans! Maybe add it to the list, so it gets remembered? :) |
Hey, just wanted to say thanks for all your awesome work on this. I think I probably posted a slightly grumpy thing a while back about patches from dependencies not being supported, so sorry about that. I know how much work this stuff is and how open source can often be a thankless sort of endeavour. |
Wow, what i see is awesome, and i trustfully jumped into the beta testers boat! |
I created and maintain https://gitlab.com/geeks4change/packages/treetool for that purpose. Feel free to steal from there, relicensing hereby granted. |
Thanks for the great work! Would it be possible to add the capability to have different patches per environment (staging, production)? Reason I ask is that I have some projects that require specific modifications of code, that unfortunately can't be managed by existing configuration. |
EDIT: Ignore me, not had a coffee yet 😅 |
I think pretty much everything here is done. I'm going to close this out and handle any remaining tasks separately. |
Composer Patches needs a 2.0.0 release. The 1.x version is too fragile to do much of anything with. Here are the remaining things on my list - if you'd like to help with any of this, it'd be greatly appreciated. Feel free to comment or email me (
me at mygithubusername dot net
) if you need help getting started.Features
All of these items must include test coverage of some kind to be merged.
Add project-specific patch depth overrides in composer.json (using the existing configuration mechanism). Then, when guessing patch depth, that configuration (if present for the package that is being patched) should be a higher priority than the depth specified inDone in Add project-specific depth settings #452Util::getDefaultPackagePatchDepth()
Patch
object. It might also be reasonable to always use the--binary
flag where applicable. (see allow binary option and implementation #403 and Issue if trying to patch file with CRLF line ending #299 and Adds patch options support, with binary option already implemented #344)Done in Run all patchers in verbose mode #454If composer was run with
--verboseor
-v/-vv/-vvv,
--verbose` should be passed to the patching tools too.AddDone in Add --dry-run to patchers #455dry-run
to the patchers (similar to howGitPatcher
does it) (see Fixes #178: Use dry-run to test patch to avoid leftover files/folders. #202)Composer
and anIOInterface
param to dispatched events to make them more similar to the built-in Composer events. This also allows developers to reach into the currently-running Composer instance if necessary. (see Added composer & io to dispatched events, along with on patch fails event #243)Support
There are a lot of composer-patches users and they have varied ways of using the plugin.
All of this was done in #456
Cannot apply patch
= link to troubleshooting guide about how to fix your patchcomposer.json
", "Full output of related composer command with-vvv
flag", "Full contents ofpatches.lock
"Release announcement/promo
Documentation
patch
(see Requires GNU patch 2.7 for correct behavior, butcomposer-patches
does not warn the user about this! #326 for GNU Patch) ,git
(see Document minimum git version #216, Fix #174: Compatibility with older Git versions #227), etc.composer patches-repatch
if dependencies are already installed orcomposer install
if they aren't)preferred-install
) and why they should/shouldn't be set (Defined base structure and all options available README #281)docs/
section)Nice-to-haves
Test this scenario: Requires GNU patch 2.7 for correct behavior, butnot needed if we move forward with Add new patcher: git 'init' patcher #471 and/or Only have git patchers and freeform patcher? #472composer-patches
does not warn the user about this! #326 (comment)composer patches-add [args]
: this command should add the patch to composer.json (or if a patches file is configured, add it to the patches file instead). Then, download the patch so that it is cached (and so that we have the sha256) and re-generate the patches lock file. Tell the user thatcomposer patches-repatch
is the next step. (alias:pa
) (see CLI command for adding patches #81)composer patches-import [vendor/package]
: this command should find the composer.json for the specified package on disk. If there is apatches
stanza in that composer.json, grab all of the patch definitions and add them to the root composer.json (or a patches file if configured). (alias:pi
)PatchCollection
object that the resolvers returned + any changes to thePatchCollection
class needed for somebody to be able to e.g. remove a patch from the list.patch
(testing this might be tricky, but let me know how I can support) (see Support busybox #311)PatchCollection
needs a de-duplicate method, which should be called after patch resolution (Improve feedback/message when a patch was "previously applied" #289)main
because it's way too finicky. This functionality can/should be re-built as a third party plugin. Anything in this list that was closed Feb 1 - 7 or so probably has good information about things that should be supported by such a plugin.patch
? (see Pure PHP implementation of Patch (avoid a dependency from the Operating System) #262)The text was updated successfully, but these errors were encountered: