forked from johnpbloch/wordpress-core-installer
-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Allow composer v2 #3
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This replaces the setUp/tearDown methods which have changed their signature in PhpUnit 8.0
beforeClass only runs once before the test suite, whereas before runs before each test. Now the install paths get reset before each test and they get reset after the whole suite.
Syntax highlight JSON in README
Fix test failures in Travis CI
Composer version 2 has `composer-plugin-api` version 2. This PR updates the version constraint to `^1 || ^2` so we can support both composer versions. See [What's new in Composer 2](https://php.watch/articles/composer-2) and [UPGRADE-2.0](https://github.com/composer/composer/blob/master/UPGRADE-2.0.md#for-integrators-and-plugin-authors) for more changes in API. Empty methods `\johnpbloch\Composer\WordPressCorePlugin::deactivate()` and `\johnpbloch\Composer\WordPressCorePlugin::uninstall()` are added to make it compatible both versions.
Add support for Composer version 2
jstoone
commented
Aug 11, 2020
@austinpray in no way mean to rush you, but would you have time to have a look at this in the near future? |
@jstoone yep I'll have time to test this today or tomorrow 👍 |
@jstoone This LGTM! Will tag it up in a moment |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About
This pulls latest changes from upstream, which allows for Composer v2 compatibility given by the following PR johnpbloch#27.
These changes should allow us to close #2.
Changes
When merging from upstream, conflicts arose as there were references to
johnpbloch
, which I've changed back to useRoots
, in the following files:README.md
src/WordPressCoreInstallerTest.php
src/WordPressCorePluginTest.php
Also method signature for
WordPressCoreInstallerTest#resetInstallPaths()
has changed to beingstatic
.Testing notes
To change back and forth between composer v2 (snapshot) and stable v1, you can do as follows:
Backwards compatibility breaks
I would recommand we follow John's example, and tag this change as v2.0.0, as though the updates from upstream we're dropping support for
php5.4
andphp5.5
in favor ofphp7.3
andphp7.4
. See changes in.travis.yml
-file.