Re: Suggestions regarding Pear & PHP5
| From: | Greg Beaver | Date: | Thu, 18 Dec 2003 17:00:03 +0000 |
| Subject: | Re: Suggestions regarding Pear & PHP5 | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9669@lists.php.net to get a copy of this message | ||
Hi Thomas,
We are on this behind the scenes. The solution that looks best is to have different channels for releases. A package that is PHP 4 only would be released through the default PEAR channel, a package that works in both would be released through both the PEAR and the PEAR-php5 channel, and a php5-only through the PEAR-php5 channel.
As for the dependency grabbing idea, that is very involved, but not impossible. php.ini settings are documented easily by the coding standards. All PEAR packages must conform to those settings. Compile options are specified using the ext type of dependencies, and package dependencies are the pkg type of dependencies
PhpDocumentor doesn't read package.xml, as it was designed independently of PEAR, but this could be added in a custom converter.
You won't need to worry about having to restart development, as long as your dev box has the same settings as the live one. The pear installer won't even let you install a package that does not fit your configuration, if the package.xml is properly written.
Greg
Thomas Svenson wrote:
Since PHP5 has a very improved oo model, I think it would be a good idea to create a compatibility scheme for Pear projects. I would like to suggest the following: PHP4 = Requires PHP v4.x PHP4+5 = Works with both PHP v4.x and v5.x PHP5 = Optimized/rewritten to take full advantage of PHP5 Adding to this it would be nice if every package in the Pear project had a setting for this, plus official PHP releases it is verified to work with. Then it would be very simple to add a filter to the Packages section of pear.php.net. This filter will simply let me set the version of PHP I use and only list items that is verified to be compatible with it. Another very nice feature would be if it was possible to select x number of packages (those I plan to use) and then get a list of requirement for these packages. These requirements would be dependencies of other needed packages, what PHP needs (compile options) and php.ini settings. Unless PhpDocumentor already supports it, it would be very nice to be able to document these dependencies directly in the source code as well. Another Pear module could then be able to extract this documentation and thus quickly give me a dependency and requirement list for my installation. Would this be overkill you think? For me it would most likely save a lot of time testing packages to check if they work with my PHP, just to discover later into the project that features doesn't work with the PHP I use and thus risk to force me to restart development for parts of it. /Thomas