cvs: pear-core / package-PEAR.xml package2.xml /PEAR Dependency2.php /tests/PEAR_Dependency2 test_checkPearinstallerDependency_valid.phpt

From: Date: Mon, 27 Apr 2009 20:30:13 +0000
Subject: cvs: pear-core / package-PEAR.xml package2.xml /PEAR Dependency2.php /tests/PEAR_Dependency2 test_checkPearinstallerDependency_valid.phpt
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-8382@lists.php.net to get a copy of this message
cellog Mon Apr 27 20:30:13 2009 UTC Modified files: /pear-core package-PEAR.xml package2.xml /pear-core/PEAR Dependency2.php /pear-core/tests/PEAR_Dependency2 test_checkPearinstallerDependency_valid.phpt Log: fix pearinstaller dep min/max bounds validation http://cvs.php.net/viewvc.cgi/pear-core/package-PEAR.xml?r1=1.585&r2=1.586&diff_format=u Index: pear-core/package-PEAR.xml diff -u pear-core/package-PEAR.xml:1.585 pear-core/package-PEAR.xml:1.586 --- pear-core/package-PEAR.xml:1.585 Sat Apr 25 20:15:23 2009 +++ pear-core/package-PEAR.xml Mon Apr 27 20:30:12 2009 @@ -95,6 +95,7 @@ * Fix Bug #16108: PEAR_PackageFile_Generator_v2 PHP4 parse error when running upgrade-all [dufuz] * Fix Bug #16113: Installing certain packages fails due incorrect encoding handling [dufuz] * Fix Bug #16122: PEAR RunTest failed to run as expected [dufuz] + * Fix pearinstaller dep validation of min/max bounds [cellog] </notes> <provides type="class" name="OS_Guess"/> <provides type="class" name="System"/> http://cvs.php.net/viewvc.cgi/pear-core/package2.xml?r1=1.497&r2=1.498&diff_format=u Index: pear-core/package2.xml diff -u pear-core/package2.xml:1.497 pear-core/package2.xml:1.498 --- pear-core/package2.xml:1.497 Sat Apr 25 20:15:23 2009 +++ pear-core/package2.xml Mon Apr 27 20:30:12 2009 @@ -99,6 +99,7 @@ * Fix Bug #16108: PEAR_PackageFile_Generator_v2 PHP4 parse error when running upgrade-all [dufuz] * Fix Bug #16113: Installing certain packages fails due incorrect encoding handling [dufuz] * Fix Bug #16122: PEAR RunTest failed to run as expected [dufuz] + * Fix pearinstaller dep validation of min/max bounds [cellog] </notes> <contents> <dir name="/"> http://cvs.php.net/viewvc.cgi/pear-core/PEAR/Dependency2.php?r1=1.59&r2=1.60&diff_format=u Index: pear-core/PEAR/Dependency2.php diff -u pear-core/PEAR/Dependency2.php:1.59 pear-core/PEAR/Dependency2.php:1.60 --- pear-core/PEAR/Dependency2.php:1.59 Tue Feb 24 23:38:22 2009 +++ pear-core/PEAR/Dependency2.php Mon Apr 27 20:30:12 2009 @@ -9,7 +9,7 @@ * @author Greg Beaver <cellog@php.net> * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Dependency2.php,v 1.59 2009/02/24 23:38:22 dufuz Exp $ + * @version CVS: $Id: Dependency2.php,v 1.60 2009/04/27 20:30:12 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -553,7 +553,7 @@ } } - if (version_compare($pearversion, $dep['min'], '<')) { + if (version_compare($pearversion, $dep['min'], '<=')) { if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { return $this->raiseError('%s requires PEAR Installer' . $extra . ', installed version is ' . $pearversion); @@ -564,7 +564,7 @@ } if (isset($dep['max'])) { - if (version_compare($pearversion, $dep['max'], '>')) { + if (version_compare($pearversion, $dep['max'], '>=')) { if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { return $this->raiseError('%s requires PEAR Installer' . $extra . ', installed version is ' . $pearversion); http://cvs.php.net/viewvc.cgi/pear-core/tests/PEAR_Dependency2/test_checkPearinstallerDependency_valid.phpt?r1=1.3&r2=1.4&diff_format=u Index: pear-core/tests/PEAR_Dependency2/test_checkPearinstallerDependency_valid.phpt diff -u pear-core/tests/PEAR_Dependency2/test_checkPearinstallerDependency_valid.phpt:1.3 pear-core/tests/PEAR_Dependency2/test_checkPearinstallerDependency_valid.phpt:1.4 --- pear-core/tests/PEAR_Dependency2/test_checkPearinstallerDependency_valid.phpt:1.3 Sat May 26 00:00:57 2007 +++ pear-core/tests/PEAR_Dependency2/test_checkPearinstallerDependency_valid.phpt Mon Apr 27 20:30:13 2009 @@ -38,6 +38,24 @@ )); $phpunit->assertNoErrors('exclude 3'); $phpunit->assertTrue($result, 'exclude 3'); + +$result = $dep->validatePearinstallerDependency( + array( + 'min' => '4.3.11', + 'max' => '5.0.0', + 'exclude' => array('4.3.9','4.3.10') + )); +$phpunit->assertNoErrors('min bounds'); +$phpunit->assertTrue($result, 'min bounds'); + +$result = $dep->validatePearinstallerDependency( + array( + 'min' => '4.3.8', + 'max' => '4.3.11', + 'exclude' => array('4.3.9','4.3.10') + )); +$phpunit->assertNoErrors('max bounds'); +$phpunit->assertTrue($result, 'max bounds'); echo 'tests done'; ?> --CLEAN--

« previous php.pear.core (#8382) next »