mirror of
https://github.com/semver/semver.git
synced 2026-07-10 19:50:47 -05:00
[GH-ISSUE #671] Invalid version string "8.x-1.x-dev" #4703
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jderusse on GitHub (Feb 25, 2021).
Original GitHub issue: https://github.com/semver/semver/issues/671
When analyzing a
composer.lockfile sent by customer, I discovered this package:When parsing the version, Semver throws an
UnexpectedValueException.note: This exception, is also thrown when running
$composer->getLocker()->getLockedRepository()when theArrayLoaderis loading the package.So, I wonder, if this is a legitimate version, and if we should patch Semver?
@jjlharrison commented on GitHub (Feb 25, 2021):
I think https://github.com/npm/node-semver would be the correct repository for this issue. This repository is for the semver specification.
@ljharb commented on GitHub (Feb 25, 2021):
Not node; composer is PHP.
@steveklabnik commented on GitHub (Feb 25, 2021):
Yes, this bug should be compiled against composer, not against the specification. Thank you!
@steveklabnik commented on GitHub (Feb 25, 2021):
(on a non-procedural note: this is not a valid semver version. Now, usually what is put into files is a range, not a version, and ranges are not technically in the semver spec yet. https://github.com/semver/semver/pull/584 is the current draft of the proposal for adding it to the spec. I still have not had the time to actually review it yet. 2020 was quite the year. but it is likely (though I haven't used composer so i can't be 100% sure) that you'd want to compare this to that, but you'd really need the composer maintainers to say. it is very clearly not a semver version though. given this is in a lockfile, maybe this is a version, and so that would be some sort of bug in composer)
@jderusse commented on GitHub (Feb 25, 2021):
oh sorry about the wrong repo