Re: Auto-detecting PHP4 vs. PHP5 PEAR packages

From: Date: Fri, 02 Apr 2004 20:47:48 +0000
Subject: Re: Auto-detecting PHP4 vs. PHP5 PEAR packages
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-26973@lists.php.net to get a copy of this message
Philippe Jausions (11abacus.com) wrote:
Before PEAR becomes a mess of dual version of packages, one dedicated to PHP 4 and one for PHP 5, wouldn't be possible to advise of a way to keep loading the packages the same way. This is provided that both versions of the packages provide the same API. For some packages, a rewrite to take advantage of PHP5 could be welcome, but should the user be afflicted by having to edit each and every script when the package changes name? I'm taking for example the PHPUnit package, which has now a PHPUnit2 "version". Wouldn't it be nice to do a simple "require_once('PHPUnit.php)" regardless of the PHP version? My "concern" is for people who don't have control over what version of PHP they use (i.e. customers of web hosting companies.) If you want to transfer a site from one host to another, it would be nice to not have to modify the scripts' "require_once" to point to the proper package name. I read in one of the thread somewhere that the package should simply get a higher version # with a dependency for PHP > 5. Great, but shouldn't it be made into a PEAR policy instead of letting the package maintainers decide what they want. Besides if you want to change names, why not use PHPUnit*5* for instance, instead of PHPUnit*2*. It would make more sense, but still, I find that a less than idealistic solution. I don't know what the best option is, but it sure would be worth it to figure it out *BEFORE* things start getting hectic. 1. Must the package names remain the same? 2. Should an intermediate file be used to "include_once" the proper file based on PHP version? If "yes", how should the files be organized? 3. ...?
see this regulation for why things are done the way they are: http://pear.php.net/group/docs/20031114-bbr.php this enabled parallel installation of running of different versions of a package. we dont plan to separate pear in php4 and php5. instead we aim to have packages that work in both versions and if this is not feasible create new major versions which address php5. regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07

« previous php.pear.dev (#26973) next »