Re: Re: Lack of recommended versions of setPhpDep()?
| From: | Gregory Beaver | Date: | Tue, 21 Aug 2007 18:10:56 +0000 |
| Subject: | Re: Re: Lack of recommended versions of setPhpDep()? | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-47818@lists.php.net to get a copy of this message | ||
Travis Swicegood wrote:
> On Aug 20, 2007, at 12:13 PM, Gregory Beaver wrote:
>
>> Travis Swicegood wrote:
>>> Hey guys,
>>>
>>> Is there any particular reason that PEAR_PackageFile_v2_rw::setPhpDep()
>>> does not have a recommended version argument? It seems like for
>>> continuity's sake it should have had it; but it also seems rather
>>> useful. An example would be the recent issues with ext/JSON. If my
>>> app
>>> required its handling of UTF-8, it would have had issues with 5.2.1,
>>> but
>>> only rarely and probably not enough to completely exclude it.
>>
>> Because it is impossible to guess what the php dependency actually is
>> for every project? In theory, a developer should know the minimum php
>> version he/she is supporting. If not, well, perhaps there are other
>> problems afoot :). In other words, PEAR is trying to make the
>> absolutely necessary decisions and leave all others to the developer.
>
> Hey Greg,
>
> Sorry that you'll be getting this twice but I didn't see that you'd
> CC'd PEAR on the response to me.
>
> The issue here is when you have code that works with - let's just say
> 5.2.0 - 5.2.3. If your code relied for a small piece of functionality
> on JSON that was compiled with 5.2.x, it would have had been broken in
> certain versions. Unless you were distributing to people who used
> lots of high ASCII UTF-8 you're app wouldn't really be broken in
> 5.2.1, but there would be a fringe case. That doesn't quite seem like
> a reason to completely exclude 5.2.1, but would definitely make a case
> for recommending a newer version.
Hi Travis,
I misunderstood your request. I thought you meant an optional parameter
to the php version for the setPhpDep() function, but you really meant
adding a <recommended> tag to the php dependency (correct me if I'm wrong).
The reason this doesn't happen is because the <recommended> tag is
strictly enforced unless you pass --loose. In other words, you could
only specify 1 PHP version that is recommended, and people with other
versions, including newer ones, would have to use --loose (or worse,
--force) to install.
There is no way to specify that a new PHP version is compatible
post-release, but there is a way to specify that a new package release
is compatible post-release with the <compatible> tag. So, in short,
<recommended> does not function the way you think it does (reading
between the lines) and would not be appropriate for php version
dependencies.
Greg