Re: Re: move PEAR to PHP 5-only?
| From: | Greg Beaver | Date: | Sat, 01 Oct 2005 18:18:54 +0000 |
| Subject: | Re: Re: move PEAR to PHP 5-only? | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev php.pear.core |
| Request: | Send a blank email to pear-dev+get-40025@lists.php.net to get a copy of this message | ||
Justin Patrin wrote:
> On 10/1/05, Pierre <pierre.php@gmail.com> wrote:
>>Once 5.1 is out, we can make 4.3 the minumum requirements. But droping
>>4.x support in any PEAR 1.x releases is not possible, or we drop all
>>the rules which make the quality of our releases.
>>
>
>
> I agree. Dropping support for PHP4 constitutes a BC break. Think of
> Joe Developer, who upgrades PEAR-1.4 to PEAR-1.5. Oops, PEAR breaks.
> This is what defines a BC break.
Not so. For devs with PHP 4:
$ pear up PEAR
error: dependencies failed (requires PHP > 5.0.0)
For devs with PHP 5:
$ pear up PEAR
upgrade OK channel://pear.php.net/PEAR-1.5.0
> Now, it is certainly possible that you can add a PHP5 dependency to
> the PEAR package.xml, but this is only a quick fix for the above
> problem. Anyone using PHP4 will be shut out from updates and bug fixes
> in the 1.x line.
Also not so - PEAR will prevent upgrading to a PHP5-only version. We
can continue to support 1.4.x in the same way that 1.3.x was supported
while PEAR 1.4.x was being developed.
> To move to only PHP5, PEAR will have to move to PEAR2 as this is a BC
> break. You're welcome to take the current code, make it PHP5-only, and
> rename it PEAR2, but I doubt this is what you want.
BC break = packages that depend on it stop working. This will not
happen. For instance, packages that use actual PEAR code:
- PEAR_PackageFileManager
- PEAR_Info
- anything that uses PEAR_Error
- anything that extends the PEAR class
will all continue to function normally in PHP 5, just as they do now.
The only difference will be the internals of these classes, which is no
business of these applications. Code like:
if (PEAR::isError($blah)) ...
will continue to work.
Unfortunately, this will never be E_STRICT compatible because PEAR was
stupidly designed to allow the same method to be called both statically
and with an object instance, and so we can't fix that. Other things can
be fixed, however, moving closer to a PHP5-based PEAR without requiring
a complete rewrite.
A rewrite of PEAR to take advantage of new features in PHP 5 will take a
year or more, anyone who says otherwise is trying to sell snake oil :).
There are many considerations, such as whether to get a basic installer
built into PHP as an extension (a very good idea), and how to do that.
No, this will not happen overnight.
Greg