Re: official docs for package.xml 2.0 will be on pear.php.net tomorrow
| From: | Sara Golemon | Date: | Mon, 21 Mar 2005 22:42:57 +0000 |
| Subject: | Re: official docs for package.xml 2.0 will be on pear.php.net tomorrow | ||
| References: | 1 | Groups: | php.pear.dev php.pecl.dev |
| Request: | Send a blank email to pear-dev+get-36795@lists.php.net to get a copy of this message | ||
> http://pear.php.net/manual/en/guide.developers.package2.php
>
I like the improvements to the dependencies section and the "provides"
references.
One thing I'd like to see, possibly in the next revision, is a means to
specify a more complex dependency. For example, the zlib.deflate:// and
zlib.inflate:// stream filters can be provided by *either* PHP >= 5.1.0
(with the zlib extension enabled) or by PECL/zlib_filter in PHP 5.0.x.
What seems the most flexible to me, would be an ability to fork out a php
script (similar to SKIPIF in a phpt) to return a list of dependent packages
which should be installed in order to continue, or return a numeric exit
code of 0 for a "sufficient" environment, or -1 for a complete inability to
meet requirements without upgrading PHP:
<dependencies>
<run shell="php" script="depcheck.php"/>
</dependencies>
depcheck.php:
<?php
if (version_compare(php_version(), "5.1.0") >= 0) {
if (extension_loaded('zlib')) {
die(0);
} else {
die('zlib');
}
}
if (extension_loaded('zlib_filter')) die(0);
if (version_compare(php_version(), "5.0.0") < 0) die(-1);
die('zlib_filter');
?>