-
Notifications
You must be signed in to change notification settings - Fork 10
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 unnecessary methods from trait, adds Composer 2.3 compatibility #19
Conversation
Tha is for the contribution @Seldaek. We can't remove these methods without making it a major release since |
@GuySartorelli - as @Seldaek points out in #18, these methods exist on the base command, so removing them from the trait shouldn't be too big a deal? (unless the signatures are different, I suppose) But I guess if we need to release a major version to support 2.3, then so be it? |
The BC concern is if someone else is using the trait for some class that doesn't extend |
Yep, if they are abstract they will have had to implement them to get them working now. In terms of major release, what are the blockers to v2 being tagged? edit: to answer my own question: basically nothing (there are no divergences in master: https://github.com/silverstripe/recipe-plugin/compare/master |
Yeah IMO this seems really fine to do even as a minor release, but up to you. |
I'll ask Max or Steve to review this since there are a few additional considerations here.
|
I think pull-request is correct, it's removing code that should never have been there in the first place All these methods exists in composer/composer BaseCommand.php. We only use this trait on 2 classes (RequireRecipeCommand, UpdateRecipeCommand), that both extend BaseCommand. Blockers for releasing as a major are real world implications. There's several modules/recipes that require "silverstripe/recipe-plugin": "^1", and if we don't release this as a minor, then we're making it difficult for those users to receive this patch, so if they upgrade to composer 2.3.0+ now they're going to be in trouble. Yes we could update all the deps for the upcoming release to "^1 || ^2", though what happens when we need to backport a critical security patch to say framework 4.9? I think semver is worth bending a little here. The code removed here was essentially defining an interface for an upstream dependency, which was just weird. We don't release new majors when other upstream dependencies change their APIs, so I don't think we should here either. This should be released as a minor IMO. |
I tested this PR locally. It fixes the error when using composer 2.3.2. It also doesn't break anything when using composer 2.2.6 or 1.10.25. I'll try doing a deployment to our platform to make sure things work there as well. Presuming that works well, I'm inclined to merge this PR and tag a release to ship it. |
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.
Confirmed this fixes the issue and doesn't break anything anywhere else.
I'll merge this and tag version 1.6.0
I believe this should fix things reported in #18