composer / semver

Semantic versioning utilities with the addition of version constraints parsing and checking.
MIT License
3.15k stars 76 forks source link

Added support for dates with format `Ymd.minor.patch` #48

Closed nazar-pc closed 7 years ago

nazar-pc commented 8 years ago

Works identical to major.minor.patch. Fixes #32, https://github.com/fxpio/composer-asset-plugin/issues/185

nazar-pc commented 7 years ago

Can anyone look at this simple PR?

alcohol commented 7 years ago

I am not sure if we want to keep adding more version formats. We already support semver plus a wide range of exotic less used formats. If we add every format everyone comes up with, soon a version won't carry any meaning anymore.

nazar-pc commented 7 years ago

This is basically improving support for regular major.minor.patch, since major component is currently limited to 5 characters.

alcohol commented 7 years ago

It is limited explicitly to 5 so that it does not overlap with the date(time) regex.

nazar-pc commented 7 years ago

I know, but sometimes we might need to support 6 digits like in linked issues, so why not?

alcohol commented 7 years ago

Well, that is open to discussion. As mentioned in #32, we are not really convinced that this needs "fixing".

@Seldaek is it easy to determine what the impact of this might be on the Packagist database?

Seldaek commented 7 years ago

No it's not easy to tell what the impact would be.. and since it just is to support an external package versioning scheme that isn't even PHP, I would tend to say it's not really our problem. The assets install plugin should make sure it provides valid version identifiers to Composer. Should be as easy as replacing dots by dashes if you see a large version number that looks like a date?