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

[semver] semver.mwl.be doesn't interpret the caret (^) operator same way as composer #7238

Closed
phansys opened this issue Apr 4, 2018 · 5 comments

Comments

@phansys
Copy link
Contributor

phansys commented Apr 4, 2018

Current documentation about Caret Version Range states that ^1.2.3 is equivalent to >=1.2.3 <2.0.0, but semver.mwl.be interprets ^1.2.3 as >=1.2.3 <1.3.0, and ^1.2 as >=1.2.0 <1.3.0.

See these examples:

@stof
Copy link
Contributor

stof commented Apr 5, 2018

semver.mwl.be is not maintained by the composer team. Report this to their maintainers.

@stof
Copy link
Contributor

stof commented Apr 5, 2018

your bug report is wrong. You are reporting about ^1.2.3, but your tests are using ^0.1.1.

The tool is perfectly right in this case. A 0.x major version behaves in a special way in semver, as it means that any increment of the next number can be a BC breaking release too (and so ^ rejects them).

See https://semver.mwl.be/#?package=symfony%2Fsymfony&version=%5E3.2.1&minimum-stability=stable for the proof.

@stof
Copy link
Contributor

stof commented Apr 5, 2018

@alcohol this issue should be closed, as there is no issue at all

@stof
Copy link
Contributor

stof commented Apr 5, 2018

and here is a quote from the composer doc (the last sentence in the paragraph you referenced in the original issue):

For pre-1.0 versions it also acts with safety in mind and treats ^0.3 as >=0.3.0 <0.4.0.

@alcohol alcohol closed this as completed Apr 5, 2018
@phansys
Copy link
Contributor Author

phansys commented Apr 5, 2018

Sorry for the misunderstanding, I didn't noticed the special behavior for pre-1.0 versions. Thank you.

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

No branches or pull requests

3 participants