johnpbloch / wordpress-core-installer

A composer installer for WordPress core so I can stop saying core is a wordpress-plugin type package.
https://packagist.org/packages/johnpbloch/wordpress-core-installer
GNU General Public License v2.0
207 stars 49 forks source link

Add support for Composer version 2 #27

Closed Ayesh closed 4 years ago

Ayesh commented 4 years ago

Hi John,

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 and UPGRADE-2.0 for more changes in API. Empty methods \johnpbloch\Composer\WordPressCorePlugin::deactivate() and \johnpbloch\Composer\WordPressCorePlugin::uninstall() are added to make it compatible both versions.

Related: composer/composer#8726

Thank you.

codecov-io commented 4 years ago

Codecov Report

Merging #27 into master will not change coverage. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #27   +/-   ##
=========================================
  Coverage     94.59%   94.59%           
  Complexity       19       19           
=========================================
  Files             2        2           
  Lines            37       37           
=========================================
  Hits             35       35           
  Misses            2        2           
Impacted Files Coverage Δ Complexity Δ
src/johnpbloch/Composer/WordPressCorePlugin.php 60.00% <0.00%> (ø) 3.00 <2.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bb894f3...7410911. Read the comment docs.

johnpbloch commented 4 years ago

Howdy @Ayesh,

Thanks so much for taking the time to send this PR in! I ended up causing a few conflicts with your work in the process of getting the test suite to work with the latest version of PHPUnit, so I'm not sure how it's going to end up attributing the line changes to you when I resolve them and merge this in, but just in case I also gave you text credit in the changelog at the bottom of the readme.

Ayesh commented 4 years ago

Awesome, thank you so much 🙏.