Re: Re: [RFC] PHP_Compat, MIME_Type & mime_content_type
| From: | bertrand Gugger | Date: | Fri, 01 Jul 2005 07:55:53 +0000 |
| Subject: | Re: Re: [RFC] PHP_Compat, MIME_Type & mime_content_type | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-38406@lists.php.net to get a copy of this message | ||
Hi all,
Justin Patrin wrote:
On 6/27/05, Joe Stump <joe@joestump.net> wrote:- a replacement text making the require_once - inserting some optional prefix to targeted functions call OK that needs some amenagement of dependencies I fear, means extend the dependencies to build some *or* container as: <dependencies> <required> <choice> <alternate> <php>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. I ask myself if we couldn't possibly use the replace task of the pear installer to install the packages needing eventually PHP_Compat when PHP4 with:
<min>5.1</min></php> </alternate> <alternate> <php>
<min>4.3</min></php> <package>
<name>PHP_Compat</name>
<min>1.4</min>
</package>
</alternate>
</choice>
....
</required>
</dependencies>
That could also solve other alternatives, say GD / Imagemagick for instance ...
Was something like that already planned ?
Perhaps for a next version ?
What do you think ?
à+
--
bertrand "toggg" Gugger