cvs: pear-core /PEAR/PackageFile/v2 Validator.php
| From: | Greg Beaver | Date: | Thu, 12 May 2005 04:23:57 +0000 |
| Subject: | cvs: pear-core /PEAR/PackageFile/v2 Validator.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-31808@lists.php.net to get a copy of this message | ||
cellog Thu May 12 00:23:57 2005 EDT
Modified files:
/pear-core/PEAR/PackageFile/v2 Validator.php
Log:
add versioned conflicts to validation
http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/v2/Validator.php?r1=1.62&r2=1.63&ty=u
Index: pear-core/PEAR/PackageFile/v2/Validator.php
diff -u pear-core/PEAR/PackageFile/v2/Validator.php:1.62
pear-core/PEAR/PackageFile/v2/Validator.php:1.63
--- pear-core/PEAR/PackageFile/v2/Validator.php:1.62 Sun Apr 17 15:13:57 2005
+++ pear-core/PEAR/PackageFile/v2/Validator.php Thu May 12 00:23:56 2005
@@ -17,7 +17,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: Validator.php,v 1.62 2005/04/17 19:13:57 cellog Exp $
+// $Id: Validator.php,v 1.63 2005/05/12 04:23:56 cellog Exp $
/**
* Private validation class used by PEAR_PackageFile_v2 - do not use directly, its
* sole purpose is to split up the PEAR/PackageFile/v2.php file to make it smaller
@@ -571,6 +571,9 @@
$structure = array(
'name',
'channel',
+ '*min',
+ '*max',
+ '*exclude',
'conflicts',
'*providesextension',
);
@@ -595,10 +598,6 @@
isset($dep['recommended']) || isset($dep['exclude']))) {
$this->_uriDepsCannotHaveVersioning('<dependencies>' . $group .
$type);
}
- if (isset($dep['conflicts']) && (isset($dep['min']) ||
isset($dep['max']) ||
- isset($dep['recommended']) || isset($dep['exclude']))) {
- $this->_conflictingDepsCannotHaveVersioning('<dependencies>' .
$group . $type);
- }
if (isset($dep['channel']) && strtolower($dep['channel']) ==
'__uri') {
$this->_DepchannelCannotBeUri('<dependencies>' . $group . $type);
}
@@ -651,6 +650,9 @@
if (isset($dep['conflicts'])) {
$structure = array(
'name',
+ '*min',
+ '*max',
+ '*exclude',
'conflicts',
);
} else {
@@ -671,10 +673,6 @@
$type .= '<name>' . $dep['name'] . '</name>';
}
$this->_stupidSchemaValidate($structure, $dep, $type);
- if (isset($dep['conflicts']) && (isset($dep['min']) ||
isset($dep['max']) ||
- isset($dep['recommended']) || isset($dep['exclude']))) {
- $this->_conflictingDepsCannotHaveVersioning($type);
- }
if (isset($dep['min'])) {
if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?$/',
$dep['min'])) {