1
0
Fork 0

Correction at method parseVersion() of Composer\Repository\PearRepository.

pull/217/head
Henrique Moody 2012-01-17 17:02:39 -02:00
parent be448e09b4
commit 234a6710a1
1 changed files with 11 additions and 8 deletions

View File

@ -131,15 +131,17 @@ class PearRepository extends ArrayRepository
*/ */
private function parseVersion(array $data) private function parseVersion(array $data)
{ {
if (!isset($data['min']) && !isset($data['max'])) {
return '*';
}
$versions = array();
if (isset($data['min'])) { if (isset($data['min'])) {
$version = '>=' . $data['min']; $versions[] = '>=' . $data['min'];
} else {
$version = '>=0.0.0';
} }
if (isset($data['max'])) { if (isset($data['max'])) {
$version .= ',<=' . $data['max']; $versions[] = '<=' . $data['max'];
} }
return $version; return implode(',', $versions);
} }
/** /**
@ -165,6 +167,7 @@ class PearRepository extends ArrayRepository
} }
} }
} }
var_dump($data);die;
return $data; return $data;
} }