You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 2, 2023. It is now read-only.
* standarizes the comparator/range/whatever-string to chunks
@@ -16,6 +18,7 @@ function __construct($versions) {
16
18
$versions=preg_replace('/'.self::$global_single_comparator.'(\\s+-\\s+)?'.self::$global_single_xrange.'/','$1$2$3',$versions); //Paste comparator and version together
17
19
$versions=preg_replace('/\\s+/', '', $versions); //Condense multiple spaces to one
18
20
if(strstr($versions, '-')) $versions=self::rangesToComparators($versions); //Replace all ranges with comparators
21
+
if(strstr($versions,'~')) $versions=self::spermiesToComparators($versions); //Replace all spermies with comparators
19
22
if(strstr($versions, 'x')||strstr($versions,'X')||strstr($versions,'*')) $versions=self::xRangesToComparators($versions); //Replace all x-ranges with comparators
20
23
$or=explode('||', $versions);
21
24
foreach($oras &$orchunk) {
@@ -38,7 +41,7 @@ function satisfiedBy(version $version) {
38
41
preg_match($expression, $ablocks, $matches);
39
42
$comparators=$matches[1];
40
43
$version2=$matches[2];
41
-
if($comparators=='') $comparators='=='; //Use equal if no comparator is set
44
+
if($comparators==='') $comparators='=='; //Use equal if no comparator is set
42
45
if(!version_compare($version, $version2, $comparators)) { //If one chunk of the and-loop does not match...
43
46
$ok=false; //It is not okay
44
47
break; //And this loop will surely fail: return to or-loop
@@ -106,7 +109,7 @@ static protected function standarizeSingleComparator($version) {
0 commit comments