cvs: pear-core /PEAR/Validator PECL.php

From: Date: Mon, 23 Jan 2006 17:19:10 +0000
Subject: cvs: pear-core /PEAR/Validator PECL.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-37720@lists.php.net to get a copy of this message
cellog Mon Jan 23 17:19:10 2006 UTC Modified files: /pear-core/PEAR/Validator PECL.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/Validator/PECL.php?r1=1.5&r2=1.6&diff_format=u Index: pear-core/PEAR/Validator/PECL.php diff -u pear-core/PEAR/Validator/PECL.php:1.5 pear-core/PEAR/Validator/PECL.php:1.6 --- pear-core/PEAR/Validator/PECL.php:1.5 Fri Jan 6 04:47:37 2006 +++ pear-core/PEAR/Validator/PECL.php Mon Jan 23 17:19:10 2006 @@ -9,7 +9,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: PECL.php,v 1.5 2006/01/06 04:47:37 cellog Exp $ + * @version CVS: $Id: PECL.php,v 1.6 2006/01/23 17:19:10 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a5 */ @@ -32,6 +32,15 @@ { function validateVersion() { + if ($this->_state == PEAR_VALIDATE_PACKAGING) { + $versioncomponents = explode('.', $version); + $last = array_pop($versioncomponents); + if (substr($last, 1, 2) == 'rc') { + $this->_addFailure('version', 'Release Candidate versions must have ' . + 'upper-case RC, not lower-case rc'); + return false; + } + } return true; }

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