semver
semver copied to clipboard
Wrong sorting for patches
I was trying to use your module and...
1.7.0-alpha.0
1.7.0-patch.0
1.7.0-patch2.0
1.7.0-patch.1
1.7.0-patch3.0
1.7.0-patch4.0
1.7.0
Patch must be in the end as I understand.
version_compare works properly.
array_walk($versions, 'trim');
usort($versions, 'version_compare');