Re: PEAR_Autoloader
| From: | Greg Beaver | Date: | Mon, 27 Oct 2003 02:33:02 +0000 |
| Subject: | Re: PEAR_Autoloader | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-23012@lists.php.net to get a copy of this message | ||
I think the solution to this is to provide a new file PEAR/Autoloader5.php and a wrapper PEAR/Autoloader/wrapper4.php
<?php
class PEAR_Autoloader extends PEAR_Autoloader5 {}
?>
This will allow users like LingWitt to seamlessly switch to PHP 5, but maintain BC for oldies. Or, it could be rewritten for PEAR 2.0 (which I assume will be PHP 5-based).
In any case, I see no reason for you to have to abandon PEAR over this. If the changes are simple enough, you can open a bug report for the PEAR package at http://pear.php.net, and paste in the new file or a patch. As soon as PHP 4.3.4 is released and PHP 5 beta 2 is out, I will be happy to take care of this one, shouldn't be too hard.
Alternately, PEAR_Autoloader could be split off into its own package (and bundled as a PFC, obviously), allowing upgrades, since it doesn't really have anything to do with installation of packages.
Greg
LingWitt@insightbb.com wrote:
The Autoloader.php file requires the overload extension, which is not applicable in PHP 5. My own classes use the PEAR_Autoloader class, and thus I still need it unless I rewrite it. I have found that by removing all references to the overload extension and by modifying the __call() method to __call($method, $args), the code works perfectly with PHP 5. I don't know how to submit patches or the like, so I'm blatantly telling you my findings. Tell me what you think.