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
Refactoring #13
Refactoring #13
Conversation
| ### [Unreleased] | ||
|
|
||
| * Break: `VersionParser::parseNameVersionPairs` was removed. | ||
| * Changed: `VersionConstraint` now throws `InvalidArgumentException` instead of `Comparator::compare`. |
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.
the wording looks weird here
only used by create-project and init, not integral for semver lib
|
Admittedly it got a bit larger than I intended, my apologies for that. However, over 60% of the changes are in the tests or new functionality. Because of the renaming and coupling between some of the changes I don't see an easy way to rebase this into several PR's. |
* allows (but ignores) build metadata now * allows (but ignores) prefixing numeric versions with a v * added some more descriptive inline comments * enabled more test cases
|
/cc @naderman @stof @Seldaek @legoktm When you have time, could you give some final feedback, please? I'd like to see this wrapped up one way or another, so we can move towards an initial release (and start a PR for implementing it in composer/composer possibly). |
| @@ -9,45 +9,222 @@ | |||
| * the LICENSE file that was distributed with this source code. | |||
| */ | |||
|
|
|||
| namespace Composer\Test\Semver; | |||
| namespace Composer\Semver\Test; | |||
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.
👎
|
@GrahamCampbell if you are not going to explain your comments, please refrain from commenting at all. |
| 'strips leading v' => array('v1.0.0', '1.0.0.0'), | ||
| 'parses dates y-m as classical' => array('2010.01', '2010.01.0.0'), | ||
| 'parses dates w/ . as classical' => array('2010.01.02', '2010.01.02.0'), |
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.
Is this really parsed as classical version if the leading zeroes remain in .01 and .02?
|
Merging, my only concern (beyond the comment above which is a nitpick but can be checked later..) is the removal of parseNameVersionPairs which should be reflected in composer, it needs to be moved somewhere else, I don't think there's a PR for that yet. |
Aims to:
For the
Semver::satisfiestest I looked at npm/node-semver.