cvs: pear-core /PEAR Validate.php

From: Date: Mon, 23 Jan 2006 17:16:35 +0000
Subject: cvs: pear-core /PEAR Validate.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-37719@lists.php.net to get a copy of this message
cellog Mon Jan 23 17:16:35 2006 UTC Modified files: /pear-core/PEAR Validate.php Log: prevent packaging of release candidates containing lower-case rc instead of upper-case RC (1.0.0rc3 vs. 1.0.0RC3) version_compare() thinks 1.0.0rc3 < 1.0.0b3, but knows that 1.0.0RC3 > 1.0.0b3 (this is clearly documented at http://www.php.net/version_compare) Installation is unaffected http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Validate.php?r1=1.45&r2=1.46&diff_format=u Index: pear-core/PEAR/Validate.php diff -u pear-core/PEAR/Validate.php:1.45 pear-core/PEAR/Validate.php:1.46 --- pear-core/PEAR/Validate.php:1.45 Fri Jan 6 04:47:36 2006 +++ pear-core/PEAR/Validate.php Mon Jan 23 17:16:35 2006 @@ -15,7 +15,7 @@ * @author Greg Beaver <cellog@php.net> * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Validate.php,v 1.45 2006/01/06 04:47:36 cellog Exp $ + * @version CVS: $Id: Validate.php,v 1.46 2006/01/23 17:16:35 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -286,6 +286,13 @@ case 'beta' : // check for a package that extends a package, // like Foo and Foo2 + if ($this->_state == PEAR_VALIDATE_PACKAGING) { + if (substr($versioncomponents[2], 1, 2) == 'rc') { + $this->_addFailure('version', 'Release Candidate versions ' . + 'must have capital RC, not lower-case rc'); + return false; + } + } if (!$this->_packagexml->getExtends()) { if ($versioncomponents[0] == '1') { if ($versioncomponents[2]{0} == '0') {

« previous php.pear.cvs (#37719) next »