Open c33s opened 3 years ago
Is it really that way? Symfony version is the same Semantic Versioning as the Github provides: https://semver.org/ - and my lib supports that.
Can You provide me some link that describes this another versionins system, used by Symfony? Where did You get this info? Maybe I missed something.
symfony uses this id internally https://github.com/symfony/http-kernel/blob/v5.2.0/Kernel.php#L78
Look here: https://github.com/symfony/http-kernel/blob/4.4/Kernel.php#L80
Version 5.2.0
is "under the hood" a 050200
version. 5
stands as 05
etc. Like 4.4.18
means 040418
, but Symfony skips first zero and in the result we have 40418
:)
still would be cool if your lib can handle the skipped zeros to easiy compare them. the skipped zero maybe is for easier comparision as integer.
i fully understand if you don't add this feature as this is a special case. my solution was to parse the semver 5.2.0
with parseConstraints
https://packagist.org/packages/composer/semver and use the comparision functions of it.
My lib skips the leading zero, please read the tests to find out: https://github.com/requtize/semver-converter/blob/master/tests/unit/SemVerConverterTest.php.
Unfortunetly, as my lib as Composer - both use Semantic Versioning. So You should get the same results of parsing with both cases. But, maybe I'm wrong :) If so, could You please write me later what the results was?
Adding the functionality You ask is not a part of the Semantic Versioning specification, as this lib was made for. Maybe You can create some abstraction for my classess and do the thing?
symfonys kernel version and id:
so its 1 zero, 2 zeros, 2 zeros as far as i understand your nice lib.