-
Notifications
You must be signed in to change notification settings - Fork 799
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
Autoloader: Support Composer v2.0 #15921
Conversation
Thank you for the great PR description! When this PR is ready for review, please apply the E2E results is available here (for debugging purposes): https://jetpack-e2e-dashboard.herokuapp.com/pr-15921 Scheduled Jetpack release: July 7, 2020. |
|
In the changelog, we shouldn't declare Composer 2.0 support until after we bump |
@kbrown9 This now needs a rebase since we've merged the other set of changes. |
8dbc058
to
c6b191f
Compare
I rebased to resolve a merge conflict and force-pushed the updated commit.
|
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 should be ready to merge, but it's going to need another rebase because of #16316.
Add support for Composer 2.0: - Allow version ^2.0 of the composer-plugin-api package. - Implement the PluginInterface::deactivate() and PluginInterface::uninstall() methods. Code cleanup: - Fix a typo.
c6b191f
to
588c411
Compare
Fixes #15793
Composer v2.0 will be released soon, and the autoloader needs to be updated to add support for v2.0.
NOTE: One of Jetpack's dependencies,
dealerdirect/phpcodesniffer-composer-installer
v0.6.2, requirescomposer-plugin-api
v^1.0 so it's not compatible with Composer 2.0. Adding support for Composer v2.0 is in progress here.Changes proposed in this Pull Request:
composer-plugin-api
package.CustomAutoloaderPlugin::deactivate()
andCustomAutoloaderPlug::uninstall()
methods which have been added toPluginInterface
.Is this a new feature or does it add/remove features to an existing part of Jetpack?
Does this pull request change what data or activity we track or use?
Testing instructions:
CustomAutoloaderPlugin
must work with both Composer v1.x and v2.0, so we'll test with version 1.10.6 and version 2.0Test with the latest stable version of Composer, v1.10.6
Run
composer --version
and confirm that you’re using v1.10.6. If not, usecomposer self-update --stable
to update.Run
composer update
and verify that no errors are generated. The Jetpack Autoloader files should be generated:Test with the Composer v2.0 snapshot version:
composer self-update --snapshot
to install v2.0.composer update --ignore-platform-reqs
and verify that no errors are generated. The Jetpack Autoloader files listed above should be generated.NOTE: The
—ignore-platform-reqs
option is required for this test because one of Jetpack’s dependencies does not support Composer 2.0 (see details above).dealerdirect/phpcodesniffer-composer-installer
requirement from Jetpack’scomposer.json
file, then runningcomposer update
. No errors should be generated, and the autoloader files listed above should be created.Proposed changelog entry for your changes: