-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Composer: allow composer/installers 2.x #65356
Conversation
Composer released the first version of `composer/installers` 2.x over three years ago. The 2.x range has a minimum PHP version of PHP 7.2. While WordPress and Gutenberg still supported PHP < 7.2, the requirement could have been set to `^1.0 || ^2.0`, but as support for PHP < 7.2 has now been dropped, I see no reason not to require the package at `^2.0` outright. Having said that, there may still be other plugins out there which don't allow for the `composer/installers` 2.x package yet and if one such plugins would be installed as a dependency alongside Gutenberg, this would lead to an unresolvable conflict when running `composer install` for such a project. So with that in mind, I'm erring on the side of caution and propose to change the requirements to `^1.0 || ^2.0`. Note: this will also get rid of a PHP 8.4 deprecation notice when running various Composer commands. Refs: * https://github.com/composer/installers/blob/main/CHANGELOG.md * https://github.com/composer/installers/releases
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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.
Thanks @jrfnl. This makes sense to me.
I was trying to think of a way to eventually remove 1.x. Maybe we could:
- Call this out in the release notes when the next version of the plugin is released.
- Drop 1.x support along with the next PHP version update, whenever that ends up being.
That's always a good thing.
I would be hesitant/reluctant to do so as, for the following reasons:
I think a better measurement of when support for v 1.x can be dropped, would be to get in touch with WP Packagist and see if they can generate stats about:
Only when there are barely any plugins left which have their requirement set to |
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.
This seems like a reasonable and safe approach. We can explore potentially dropping 1.x separately in the future.
What?
Composer released the first version of
composer/installers
2.x over three years ago.The 2.x range has a minimum PHP version of PHP 7.2. While WordPress and Gutenberg still supported PHP < 7.2, the requirement could have been set to
^1.0 || ^2.0
, but as support for PHP < 7.2 has now been dropped, I see no reason not to require the package at^2.0
outright.Having said that, there may still be other plugins out there which don't allow for the
composer/installers
2.x package yet and if one such plugins would be installed as a dependency alongside Gutenberg, this would lead to an unresolvable conflict when runningcomposer install
for such a project.So with that in mind, I'm erring on the side of caution and propose to change the requirements to
^1.0 || ^2.0
.Note: this will also get rid of a PHP 8.4 deprecation notice when running various Composer commands.
Refs: