Bearsampp 2026.9.23
Loading...
Searching...
No Matches
PECL.php
Go to the documentation of this file.
1<?php
18require_once 'PEAR/Validate.php';
31{
32 function validateVersion()
33 {
34 if ($this->_state == PEAR_VALIDATE_PACKAGING) {
35 $version = $this->_packagexml->getVersion();
36 $versioncomponents = explode('.', $version);
37 $last = array_pop($versioncomponents);
38 if (substr($last, 1, 2) == 'rc') {
39 $this->_addFailure('version', 'Release Candidate versions must have ' .
40 'upper-case RC, not lower-case rc');
41 return false;
42 }
43 }
44 return true;
45 }
46
48 {
49 $ret = parent::validatePackageName();
50 if ($this->_packagexml->getPackageType() == 'extsrc' ||
51 $this->_packagexml->getPackageType() == 'zendextsrc') {
52 if (strtolower($this->_packagexml->getPackage()) !=
53 strtolower($this->_packagexml->getProvidesExtension())) {
54 $this->_addWarning('providesextension', 'package name "' .
55 $this->_packagexml->getPackage() . '" is different from extension name "' .
56 $this->_packagexml->getProvidesExtension() . '"');
57 }
58 }
59 return $ret;
60 }
61}
62?>
const PEAR_VALIDATE_PACKAGING
Definition Validate.php:22
_addFailure($field, $reason)
Definition Validate.php:137
_addWarning($field, $reason)
Definition Validate.php:145