Update ranges for 0.N versions, refs #3518
parent
9438f3a58f
commit
06e96a78e2
|
@ -109,11 +109,11 @@ class VersionSelector
|
||||||
if (count($semanticVersionParts) == 4 && preg_match('{^0\D?}', $semanticVersionParts[3])) {
|
if (count($semanticVersionParts) == 4 && preg_match('{^0\D?}', $semanticVersionParts[3])) {
|
||||||
// remove the last parts (i.e. the patch version number and any extra)
|
// remove the last parts (i.e. the patch version number and any extra)
|
||||||
if ($semanticVersionParts[0] === '0') {
|
if ($semanticVersionParts[0] === '0') {
|
||||||
if ($semanticVersionParts[2] === '0') {
|
if ($semanticVersionParts[1] === '0') {
|
||||||
|
$semanticVersionParts[3] = '*';
|
||||||
|
} else {
|
||||||
$semanticVersionParts[2] = '*';
|
$semanticVersionParts[2] = '*';
|
||||||
unset($semanticVersionParts[3]);
|
unset($semanticVersionParts[3]);
|
||||||
} else {
|
|
||||||
$semanticVersionParts[3] = '*';
|
|
||||||
}
|
}
|
||||||
$op = '';
|
$op = '';
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -99,7 +99,7 @@ class VersionSelectorTest extends \PHPUnit_Framework_TestCase
|
||||||
array('3.1.2-pl2', false, 'stable', '~3.1'),
|
array('3.1.2-pl2', false, 'stable', '~3.1'),
|
||||||
array('3.1.2-patch', false, 'stable', '~3.1'),
|
array('3.1.2-patch', false, 'stable', '~3.1'),
|
||||||
array('0.1.0', false, 'stable', '0.1.*'),
|
array('0.1.0', false, 'stable', '0.1.*'),
|
||||||
array('0.1.3', false, 'stable', '0.1.3.*'),
|
array('0.1.3', false, 'stable', '0.1.*'),
|
||||||
array('0.0.3', false, 'stable', '0.0.3.*'),
|
array('0.0.3', false, 'stable', '0.0.3.*'),
|
||||||
array('0.0.3-alpha', false, 'alpha', '0.0.3.*@alpha'),
|
array('0.0.3-alpha', false, 'alpha', '0.0.3.*@alpha'),
|
||||||
array('2.0-beta.1', false, 'beta', '~2.0@beta'),
|
array('2.0-beta.1', false, 'beta', '~2.0@beta'),
|
||||||
|
|
Loading…
Reference in New Issue