ice / framework

Source code of Ice framework
https://www.iceframework.org
BSD 3-Clause "New" or "Revised" License
341 stars 45 forks source link

Semver can't be used on pecl #292

Closed mruz closed 3 years ago

mruz commented 3 years ago

There is an issue with hyphen https://github.com/semver/semver/issues/145

We can't use semver 1.0 1.8.0-alpha1 or 2.0 1.8.0-alpha.1 on pecl:

PEAR_PackageFileManager2 Error: Package validation failed:
Error: Version type <release> is not a valid version (1.8.0-alpha1)

The version in the package.xml must also match with the source code:

Extension version mismatch between the package.xml (1.8.0alpha1) and the source code (1.8.0-alpha1)

What format we should follow?

Package versioning: https://packagist.org/about#managing-package-versions https://getcomposer.org/doc/articles/versions.md https://en.opensuse.org/openSUSE:Package_versioning_guidelines#Pre-Release_packages https://fedoraproject.org/wiki/Package_Versioning_Examples

mruz commented 3 years ago

Ice\Version::get() returns version in semver 2.0 spec: 1.8.0-alpha.1 and this will stay. In the ice section in phpinfo() we will have to put 1.8.0alpha1. We can't use semver 1.0 as we do currently: https://github.com/ice/framework/blob/c36198b8dc757858930bfc863ce1b1a1d3fe8a9b/config.json#L6

The release tags will also be in 1.8.0alpha1 format.