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

Support Composer 2.0 #111

Merged
merged 1 commit into from
Jun 25, 2020
Merged

Support Composer 2.0 #111

merged 1 commit into from
Jun 25, 2020

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented May 6, 2020

Proposed Changes

Minimal changes to updated the plugin to support Composer 2.0 which is expected late May/beginning of June.

Tested by @danepowell and myself (Windows 7). Further testing would be very welcome!

Fixes #108

@mjrider @Potherca Should this be added to the 0.6.3 or 0.7 milestone ?

Related Issues

Changes are based on guidance found in:

@Potherca
Copy link
Member

Potherca commented May 7, 2020

I can't really say anything about the code change other than it looks fine to me.

Regarding the version, I've put at on 0.7.0.

The rational is that, since Composer is going from v1 to v2 (major version change), it is allowed to be backward incompatible. This plugin might need to follow and also implement backward incompatible changes. That would mean support goes into the next major version for us as well.

Since we are not (yet) at v1 that would mean 0.7.0.. I know we are not breaking anything with these changes yet, but I tend to be conservative (i.e. careful) with versioning. I'd rather bump a major for nothing than break a minor by accident.

@jrfnl Do you concur? Or is my reasoning to thin? (I'm having trouble making isolated decisions at the moment, so a second opinion on is appreciated).

Potherca
Potherca previously approved these changes May 7, 2020
@jrfnl
Copy link
Member Author

jrfnl commented May 7, 2020

Do you concur? Or is my reasoning to thin?

@Potherca My own reasoning was similar, which is why I was asking about the milestone.

This PR doesn't break BC with Composer 1.x, but does contain a changed dependency, i.e. can be considered a "significant" enhancement, so I'm happy for it to be in 0.7.0.

My main concern about making this 0.7.0, is that lots of people don't realize that "below 1 minors" in Composer are treated as majors and they actively need to change/update their composer.json to upgrade.
As the stats on Packagist don't show details per minor anymore, I find it hard to get insight into how conscientious people are about updating this dependency and how many people are still on outdated versions.

The other side of that argument is that I know that the next release for at least five external PHPCS standards (WordPressCS, PHPCompatibility - including all framework/polyfill based substandards, VariableAnalysis, Security, PHPCSExtra) will be a >= 1 major and that those will all include a change making this plugin a dependency of the standard.
That means that people updating to those standards should be informed via the changelog of those standards that they don't need to include a Composer PHPCS Plugin themselves anymore as this one will be included by default.
Hopefully that will mean that a lot of the "end-user" projects will remove the direct dependency in favour of letting the standards manage it and, for the above mentioned standards, I know they will have the dependency setup in a flexible manner as described in the readme.

So there's that.

@Seldaek
Copy link
Contributor

Seldaek commented May 8, 2020

As per https://packagist.org/packages/dealerdirect/phpcodesniffer-composer-installer/stats#v0.5.0 ( you gotta click on "Versions" to get patch versions) it seems the bulk of people are still on 0.5, then 0.6.2 and 0.4.4 have a big chunk of users too.

@jrfnl
Copy link
Member Author

jrfnl commented May 8, 2020

@Seldaek Thanks for that. I don't know why I couldn't find it. Glad to have the insight now.

@mjrider @Potherca Seeing that approx 20% of users has so far upgraded to 0.6.x and +/- 65% is still on 0.5.x, from that perspective, I think it won't really make much difference whether we release it as 0.6.3 or 0.7.0 as most users still need to change to the next major anyway, so when they do, changing to 0.6 or 0.7 won't make a difference to them.

@mjrider
Copy link
Contributor

mjrider commented May 11, 2020

I would go for 0.7 because it is more then a bugfix

Minimal changes to updated the plugin to support Composer 2.0 which is expected late May/beginning of June.

Changes are based on guidance found in:
* #108
* composer/composer#8726
* https://github.com/composer/composer/blob/master/UPGRADE-2.0.md#for-integrators-and-plugin-authors

Tested by danepowell and myself (Windows 7). Further testing would be very welcome!

Fixes 108
@jrfnl jrfnl force-pushed the feature/support-composer-2.0 branch from abb3049 to 2cf2a33 Compare May 11, 2020 19:51
@jrfnl
Copy link
Member Author

jrfnl commented May 11, 2020

Force pushed the same commit to trigger the Travis run on .com.

@jrfnl
Copy link
Member Author

jrfnl commented May 19, 2020

@Potherca @mjrider Have either of you had a chance to test this PR yet ? How are we going to move this PR forward to make sure there is a tagged release by the time Composer 2.0 comes out ?

@jrfnl
Copy link
Member Author

jrfnl commented Jun 18, 2020

@Potherca @mjrider Anything I can do to move this PR forward ?

@jrfnl jrfnl mentioned this pull request Jun 25, 2020
@mxr576
Copy link

mxr576 commented Jun 25, 2020

Looks good to me.

@Potherca
Copy link
Member

@jrfnl Thanks for the ping, with me starting work on @pdsinterop, this got shuffle to the bottom of the pile.

Taking a look at things now. 👍

@Potherca Potherca merged commit e8d8086 into master Jun 25, 2020
@jrfnl jrfnl deleted the feature/support-composer-2.0 branch June 25, 2020 15:06
@jrfnl
Copy link
Member Author

jrfnl commented Jun 25, 2020

@Potherca Thanks for checking it out now.

I think it would be a good idea to release this soonish, but most definitely before Composer gets to a 2.0-RC release. Do you agree ? And if so, what is needed to make that happen ?

@Potherca
Copy link
Member

Already on it! Hold on... 🕕

@jrfnl
Copy link
Member Author

jrfnl commented Jun 25, 2020

@Potherca FYI: I've updated the milestones in the mean time to reflect the reality that the next release will be 0.7.0, not 0.6.3.

@Potherca
Copy link
Member

I noticed, good work! (I was called away in the middle of my release activities, hence my delay).

@jrfnl
Copy link
Member Author

jrfnl commented Jun 25, 2020

@Potherca No worries. Thanks for getting this done!

@jrfnl
Copy link
Member Author

jrfnl commented Jun 25, 2020

@Potherca Is there a release tweet I can retweet ?

@Potherca
Copy link
Member

I'm afraid not... We don't have/do official release Tweets (yet?).

Feel free to create original material...

@jrfnl
Copy link
Member Author

jrfnl commented Jun 25, 2020

FYI: https://twitter.com/jrf_nl/status/1276186600461029381

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

Successfully merging this pull request may close these issues.

Composer 2.x compatibility
5 participants