Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.9.0

Bug #7813 wrong PHP minimum version detection
Submitted: 2006-06-05 21:40 UTC
From: farell Assigned: farell
Status: Closed Package: PHP_CompatInfo (version 1.0.0)
PHP Version: 4.4.2 OS: Windows XP
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 23 - 18 = ?

 
 [2006-06-05 21:40 UTC] farell (Laurent Laville)
Description: ------------ While i've tried many times to use this package to detect minimum version of PHP, i always got the same result: PHP 5.0.0 As i've said in past on PEAR QA and DEV mailing lists internal codes of token have changed from previous versions. And are different between PHP 4 and PHP 5. Without a real fix, this package will be un-useless. I propose now today a fix for this compatibility problem. See details, and a new tarball of un-official 1.1.0 version at http://pear.laurent-laville.org/pepr/PHP_CompatInfo/ Feedback will be greatly appreciated regards Laurent PS: my test-script use source code of PEAR_PackageUpdate 0.5.0 (php min => 4.3.0) Test script: --------------- <?php require_once 'PHP/CompatInfo.php'; $info = new PHP_CompatInfo; $file = 'D:/php/pear/PEAR_PackageUpdate/PackageUpdate.php'; $options = array( 'debug' => true, 'ignore_functions' => array('debug_backtrace') ); $res = $info->parseFile($file, $options); echo '<pre>'; var_dump($res); echo '</pre>'; ?> Expected result: ---------------- array(5) { ["version"]=> string(5) "4.3.0" ["extensions"]=> array(0) { } ["constants"]=> array(0) { } ["4.3.0"]=> array(2) { [0]=> array(2) { ["function"]=> string(16) "get_include_path" ["extension"]=> string(12) "ext_standard" } [1]=> array(2) { ["function"]=> string(17) "file_get_contents" ["extension"]=> string(12) "ext_standard" } } ["4.0.0"]=> array(1) { [0]=> array(2) { ["function"]=> string(11) "array_shift" ["extension"]=> string(12) "ext_standard" } } } Actual result: -------------- array(6) { ["version"]=> string(5) "5.0.0" ["extensions"]=> array(0) { } ["constants"]=> array(9) { [0]=> string(10) "implements" [1]=> string(9) "interface" [2]=> string(8) "abstract" [3]=> string(9) "protected" [4]=> string(5) "throw" [5]=> string(8) "__LINE__" [6]=> string(5) "final" [7]=> string(6) "public" [8]=> string(5) "catch" } ["4.3.0"]=> array(2) { [0]=> array(2) { ["function"]=> string(16) "get_include_path" ["extension"]=> string(12) "ext_standard" } [1]=> array(2) { ["function"]=> string(17) "file_get_contents" ["extension"]=> string(12) "ext_standard" } } ["4.1.0"]=> array(1) { [0]=> array(2) { ["function"]=> string(15) "version_compare" ["extension"]=> string(12) "ext_standard" } } ["4.0.0"]=> array(4) { [0]=> array(2) { ["function"]=> string(9) "get_class" ["extension"]=> string(4) "zend" } [1]=> array(2) { ["function"]=> string(12) "class_exists" ["extension"]=> string(4) "zend" } [2]=> array(2) { ["function"]=> string(10) "array_keys" ["extension"]=> string(12) "ext_standard" } [3]=> array(2) { ["function"]=> string(11) "array_shift" ["extension"]=> string(12) "ext_standard" } } }

Comments

 [2006-06-06 18:29 UTC] farell (Laurent Laville)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. assigned and fixed by myself since i begun a new package leader. Laurent