semver icon indicating copy to clipboard operation
semver copied to clipboard

Wrong sorting for patches

Open andkirby opened this issue 9 years ago • 1 comments

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.

andkirby avatar Aug 18 '16 15:08 andkirby

version_compare works properly.

    array_walk($versions, 'trim');
    usort($versions, 'version_compare');

andkirby avatar Aug 18 '16 15:08 andkirby