cvs: pear-core /PEAR Common.php /PEAR/PackageFile v1.php /PEAR/PackageFile/v2 Validator.php

From: Date: Thu, 27 Oct 2005 05:07:24 +0000
Subject: cvs: pear-core /PEAR Common.php /PEAR/PackageFile v1.php /PEAR/PackageFile/v2 Validator.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-35892@lists.php.net to get a copy of this message
cellog Thu Oct 27 01:07:24 2005 EDT Modified files: /pear-core/PEAR Common.php /pear-core/PEAR/PackageFile v1.php /pear-core/PEAR/PackageFile/v2 Validator.php Log: fully fix Bug #5725: PHP5 warnings need improvement by making the error message more verbose http://cvs.php.net/diff.php/pear-core/PEAR/Common.php?r1=1.149&r2=1.150&ty=u Index: pear-core/PEAR/Common.php diff -u pear-core/PEAR/Common.php:1.149 pear-core/PEAR/Common.php:1.150 --- pear-core/PEAR/Common.php:1.149 Wed Oct 26 15:16:36 2005 +++ pear-core/PEAR/Common.php Thu Oct 27 01:07:21 2005 @@ -17,7 +17,7 @@ * @author Greg Beaver <cellog@php.net> * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Common.php,v 1.149 2005/10/26 19:16:36 cellog Exp $ + * @version CVS: $Id: Common.php,v 1.150 2005/10/27 05:07:21 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1.0 * @deprecated File deprecated since Release 1.4.0a1 @@ -765,7 +765,8 @@ array('public', 'private', 'protected', 'abstract', 'interface', 'implements', 'throw') )) { - PEAR::raiseError('Error: PHP5 packages must be packaged by php 5 PEAR'); + PEAR::raiseError('Error: PHP5 token encountered in ' . $file . + 'packaging should be done in PHP 5'); return false; } } http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/v1.php?r1=1.66&r2=1.67&ty=u Index: pear-core/PEAR/PackageFile/v1.php diff -u pear-core/PEAR/PackageFile/v1.php:1.66 pear-core/PEAR/PackageFile/v1.php:1.67 --- pear-core/PEAR/PackageFile/v1.php:1.66 Wed Oct 26 15:16:38 2005 +++ pear-core/PEAR/PackageFile/v1.php Thu Oct 27 01:07:24 2005 @@ -15,7 +15,7 @@ * @author Greg Beaver <cellog@php.net> * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: v1.php,v 1.66 2005/10/26 19:16:38 cellog Exp $ + * @version CVS: $Id: v1.php,v 1.67 2005/10/27 05:07:24 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -1039,7 +1039,7 @@ PEAR_PACKAGEFILE_ERROR_CHANNELVAL => 'Channel validator error: field "%field%" - %reason%', PEAR_PACKAGEFILE_ERROR_PHP5 => - 'Error, PHP5 token encountered, analysis should be in PHP5', + 'Error, PHP5 token encountered in %file%, analysis should be in PHP5', PEAR_PACKAGEFILE_ERROR_FILE_NOTFOUND => 'File "%file%" in package.xml does not exist', PEAR_PACKAGEFILE_ERROR_NON_ISO_CHARS => @@ -1455,7 +1455,8 @@ array('public', 'private', 'protected', 'abstract', 'interface', 'implements', 'throw') )) { - $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_PHP5); + $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_PHP5, + array($file)); } } if ($look_for == T_CLASS) { http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/v2/Validator.php?r1=1.81&r2=1.82&ty=u Index: pear-core/PEAR/PackageFile/v2/Validator.php diff -u pear-core/PEAR/PackageFile/v2/Validator.php:1.81 pear-core/PEAR/PackageFile/v2/Validator.php:1.82 --- pear-core/PEAR/PackageFile/v2/Validator.php:1.81 Wed Oct 26 15:16:38 2005 +++ pear-core/PEAR/PackageFile/v2/Validator.php Thu Oct 27 01:07:24 2005 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Validator.php,v 1.81 2005/10/26 19:16:38 cellog Exp $ +// $Id: Validator.php,v 1.82 2005/10/27 05:07:24 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 @@ -1833,8 +1833,10 @@ array('public', 'private', 'protected', 'abstract', 'interface', 'implements', 'throw') )) { - $this->_stack->push(__FUNCTION__, 'warning', array(), - 'Error, PHP5 token encountered, analysis should be in PHP5'); + $this->_stack->push(__FUNCTION__, 'warning', array( + 'file' => $file), + 'Error, PHP5 token encountered in %file%,' . + ' analysis should be in PHP5'); } } if ($look_for == T_CLASS) {

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