Re: Re: [RFC] PHP_Compat, MIME_Type & mime_content_type

From: Date: Mon, 27 Jun 2005 17:45:04 +0000
Subject: Re: Re: [RFC] PHP_Compat, MIME_Type & mime_content_type
References: 1 2 3 4 5 6 7 8  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-38336@lists.php.net to get a copy of this message
On 6/27/05, Joe Stump <joe@joestump.net> wrote: > I'm confused. Can't authors simply require a specific version of PHP? > I haven't looked over the package.xml specs in a while, but shouldn't > I be able to say "If $version < 4.2, then require PHP_Compat"? I > should at least be able to say "I see you like running old, buggy and > potentially exploitable versions of PHP, in order to run this package > or parts of this package you will need to install PHP_Compat". > I'm not a package.xml expert so I can't answer the question, but the idea is ok. If package.xml does support this then we can allow this. I still don't really like it, though. This is why packages have PHP dependencies. You have to have a certain version to run it. If a user decides to use a lower version it's their responsibility to bring their installation up to a recent version of use PHP_Compat to *try* to bring it up. However, as I said, a conditional dependency would be ok here but only if the minimum PHP version dep is thoroughly tested by the package maintainer. It would also make sense in this case for the package itself to include the PHP_Compat functions, but this needs to be done correctly. PHP_Compat's function loading function should definately be used at the least. > > On Jun 27, 2005, at 9:18 AM, Helgi Þormar wrote: > > > On Mon, 2005-06-27 at 11:19 -0400, Philippe Jausions wrote: > > > > > >> > >> I don't remember seeing anywhere on the site how to deal with > >> conditional dependency on PHP_Compat in a package. > >> > >> Let's say you want to use a fairly new useful PHP function such as > >> str_split() (PHP 5) or file_get_contents() (PHP > 4.3.0). > >> > >> Should the package itself require_once the > >> PHP/Compat/function/str_split.php or do you want to let that > >> responsibility to the end user in their own script? > >> > > > > What one should do IMHO is copy/paste from PHP_Compat and keep intact > > all respectful comments about who are the authors and where it was > > gotten from and such. > > > > - Helgi > > > > -- > > PEAR Development Mailing List (http://pear.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- > PEAR Development Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Justin Patrin

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