cvs: pear-core /PEAR/Validator PECL.php
| From: | Greg Beaver | Date: | Sun, 21 Aug 2005 03:31:50 +0000 |
| Subject: | cvs: pear-core /PEAR/Validator PECL.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-3670@lists.php.net to get a copy of this message | ||
cellog Sat Aug 20 23:31:50 2005 EDT
Modified files:
/pear-core/PEAR/Validator PECL.php
Log:
for PECL packages, check to see if the package is providing
an extension name different from the package name
and do a little warning as a preventative measure
http://cvs.php.net/diff.php/pear-core/PEAR/Validator/PECL.php?r1=1.2&r2=1.3&ty=u
Index: pear-core/PEAR/Validator/PECL.php
diff -u pear-core/PEAR/Validator/PECL.php:1.2 pear-core/PEAR/Validator/PECL.php:1.3
--- pear-core/PEAR/Validator/PECL.php:1.2 Sun Mar 20 21:05:52 2005
+++ pear-core/PEAR/Validator/PECL.php Sat Aug 20 23:31:48 2005
@@ -9,7 +9,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: PECL.php,v 1.2 2005/03/21 02:05:52 cellog Exp $
+ * @version CVS: $Id: PECL.php,v 1.3 2005/08/21 03:31:48 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a5
*/
@@ -34,5 +34,19 @@
{
return true;
}
+
+ function validatePackageName()
+ {
+ $ret = parent::validatePackageName();
+ if ($this->_packagexml->getPackageType() == 'extsrc') {
+ if (strtolower($this->_packagexml->getPackage()) !=
+ strtolower($this->_packagexml->getProvidesExtension())) {
+ $this->_addWarning('providesextension', 'package name
"' .
+ $this->_packagexml->getPackage() . '" is different from
extension name "' .
+ $this->_packagexml->getProvidesExtension());
+ }
+ }
+ return $ret;
+ }
}
?>
\ No newline at end of file