Lines Matching +refs:match +refs:version

47      * @param string $version
51 public static function parseStability($version) argument
53 $version = preg_replace('{#.+$}', '', $version);
55 if (strpos($version, 'dev-') === 0 || '-dev' === substr($version, -4)) {
59 preg_match('{' . self::$modifierRegex . '(?:\+.*)?$}i', strtolower($version), $match);
61 if (!empty($match[3])) {
65 if (!empty($match[1])) {
66 if ('beta' === $match[1] || 'b' === $match[1]) {
69 if ('alpha' === $match[1] || 'a' === $match[1]) {
72 if ('rc' === $match[1]) {
95 * @param string $version
102 public function normalize($version, $fullVersion = null) argument
104 $version = trim($version);
105 $origVersion = $version;
107 $fullVersion = $version;
111 if (preg_match('{^([^,\s]++) ++as ++([^,\s]++)$}', $version, $match)) {
112 $version = $match[1];
116 if (preg_match('{@(?:' . self::$stabilitiesRegex . ')$}i', $version, $match)) {
117 $version = substr($version, 0, strlen($version) - strlen($match[0]));
121 if (\in_array($version, array('master', 'trunk', 'default'), true)) {
122 $version = 'dev-' . $version;
126 if (stripos($version, 'dev-') === 0) {
127 return 'dev-' . substr($version, 4);
131 if (preg_match('{^([^,\s+]++)\+[^\s]++$}', $version, $match)) {
132 $version = $match[1];
136 …h('{^v?(\d{1,5})(\.\d++)?(\.\d++)?(\.\d++)?' . self::$modifierRegex . '$}i', $version, $matches)) {
137 $version = $matches[1]
143 …d{4}(?:[.:-]?\d{2}){1,6}(?:[.:-]?\d{1,3})?)' . self::$modifierRegex . '$}i', $version, $matches)) {
144 $version = preg_replace('{\D}', '.', $matches[1]);
152 return $version;
154 …$version .= '-' . $this->expandStability($matches[$index]) . (isset($matches[$index + 1]) && '' !=…
158 $version .= '-dev';
161 return $version;
165 if (preg_match('{(.*?)[.-]?dev$}i', $version, $match)) {
167 $normalized = $this->normalizeBranch($match[1]);
179 …if (preg_match('{ +as +' . preg_quote($version) . '(?:@(?:'.self::$stabilitiesRegex.'))?$}', $full…
181 …} elseif (preg_match('{^' . preg_quote($version) . '(?:@(?:'.self::$stabilitiesRegex.'))? +as +}',…
216 $version = '';
218 … $version .= isset($matches[$i]) ? str_replace(array('*', 'X'), 'x', $matches[$i]) : '.x';
221 return str_replace('x', '9999999', $version) . '-dev';
296 if (preg_match('{^([^,\s]++) ++as ++([^,\s]++)$}', $constraint, $match)) {
297 $constraint = $match[1];
301 if (preg_match('{^([^,\s]*?)@(' . self::$stabilitiesRegex . ')$}i', $constraint, $match)) {
302 $constraint = '' !== $match[1] ? $match[1] : '*';
303 if ($match[2] !== 'stable') {
304 $stabilityModifier = $match[2];
309 if (preg_match('{^(dev-[^,\s@]+?|[^,\s@]+?\.x-dev)#.+$}i', $constraint, $match)) {
310 $constraint = $match[1];
313 if (preg_match('{^(v)?[xX*](\.[xX*])*$}i', $constraint, $match)) {
314 if (!empty($match[1]) || !empty($match[2])) {
477 $version = $this->normalize($matches[2]);
482 $version = $this->normalize('dev-'.substr($matches[2], 0, -4));
490 …'==' && $op !== '=' && !empty($stabilityModifier) && self::parseStability($version) === 'stable') {
491 $version .= '-' . $stabilityModifier;
495 $version .= '-dev';
500 return array(new Constraint($matches[1] ?: '=', $version));