Skip to content
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 23 commits into from
Aug 20, 2020
Merged

Allow composer v2 #3

merged 23 commits into from
Aug 20, 2020

Conversation

jstoone
Copy link

@jstoone jstoone commented Aug 11, 2020

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 use Roots, in the following files:

  • README.md
  • src/WordPressCoreInstallerTest.php
  • src/WordPressCorePluginTest.php

Also method signature for WordPressCoreInstallerTest#resetInstallPaths() has changed to being static.

Testing notes

To change back and forth between composer v2 (snapshot) and stable v1, you can do as follows:

# Install v2 snapshot
composer self-update --snapshot

# Rollback to stable v1 release
composer self-update --rollback

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 and php5.5 in favor of php7.3 and php7.4. See changes in .travis.yml-file.

szepeviktor and others added 23 commits February 24, 2019 19:34
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.
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
.gitignore Show resolved Hide resolved
@austinpray austinpray self-requested a review August 11, 2020 15:05
@jstoone
Copy link
Author

jstoone commented Aug 17, 2020

@austinpray in no way mean to rush you, but would you have time to have a look at this in the near future?

@austinpray
Copy link

@jstoone yep I'll have time to test this today or tomorrow 👍

@austinpray austinpray merged commit 73f8488 into roots:master Aug 20, 2020
@austinpray
Copy link

@jstoone This LGTM! Will tag it up in a moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pull in latest changes from upstream, composer 2 compat
5 participants