-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Fixed v4 constraint #115
Fixed v4 constraint #115
Conversation
@GrahamCampbell That's because 4.x isn't a tag, it's a development branch and this was added to allow testing with that branch. |
No, it will work fine. That's the nice thing about composer. It knows how to install 4.0.x dev versions. |
@GrahamCampbell Thanks. I'll have a play with it again once I'm behind a proper computer to test it. |
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.
@jrfnl Should I just merge and deploy it as |
Sorry for the delay. I've finally had some time to think of some test scenarios and have a play with it. Scenario 1 - plain install for the plugin itself:
With both the Scenario 2 - minimal external project setup for PHPCS 3.x (stable)Note: PHPCSUtils also already allows for PHPCS 4.x and contains external standards which should trigger the plugin. {
"name": "jrfnl/plugin-issue-115",
"require": {
"php": ">=5.4",
"squizlabs/php_codesniffer": "^3.1",
"phpcsstandards/phpcsutils" : "^1.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0"
},
"minimum-stability": "dev",
"prefer-stable": true
} Run
Scenario 3 - minimal external project setup for PHPCS 4.x (unstable){
"name": "jrfnl/plugin-issue-115",
"require": {
"php": ">=5.4",
"squizlabs/php_codesniffer": "^4.0",
"phpcsstandards/phpcsutils" : "^1.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0"
},
"minimum-stability": "dev",
"prefer-stable": true
} Run
In other words, I have not been able to reproduce the issue this PR is supposed to solve as the test scenario did use "proper constraints", while Tested with Composer 1.1.0.8. @GrahamCampbell Could you provide a test scenario which actually demonstrates the problem ? @Potherca I'm fine with merging this either way as it doesn't seem to do any harm either. |
@GrahamCampbell Just checking in - have you had a chance to come up with a reproduction scenario for this issue ? |
I think you're right that it technically works, but it's not a proper version constraint. Composer just works out that you meant to type what I changed it to in this PR. |
@GrahamCampbell To be fair, I believe it's the other way around, though I could be wrong. Composer supports branch-based constraints. So when using the "proper" version restraint, as there is no |
I still maintain that my changes are the best way to do things, and will actually still work once a 4.x release has been tagged. |
@GrahamCampbell And once there is a (RC) release of PHPCS 4.x, we will definitely make that change. As things stand, PHPCS 4.x is not officially supported (yet), the |
4.0.x-dev
is the name of a branch, and not a version constraint. You should use a proper version constraint, otherwise anyone else who does use a one will find composer doesn't know what to do.