Re: Re: RFC::Error Handling Guidelines for PHP5 packages
| From: | Hans L | Date: | Tue, 24 Aug 2004 17:37:49 +0000 |
| Subject: | Re: Re: RFC::Error Handling Guidelines for PHP5 packages | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-32907@lists.php.net to get a copy of this message | ||
Stig S. Bakken wrote:
On Tue, 24 Aug 2004, Hans L wrote:I agree. Even maintaining concurrent versions wouldn't be a huge pain, if PEAR provided a mechanism for this. I think channels will be the saving grace here. For serious PHP5 web applications, I just don't see legacy integration as a huge concern, given that migration is generally fairly quick & easy, and certainly I wouldn't want to have to have both PEAR_Exception and PEAR_Error being used in my app. -HansYeah, but as mentioned your solution forgoes the benefits of exceptions. Agreed that the above code is ugly. There should be a method for PHP4 and one for PHP5. You know, it's really not that hard to port these packages to PHP5. For an internal project I've ported all of the Mail_* applications to PHP5 + Exceptions, and it took less than an afternoon. I don't know why people are so stuck on this issue of integrating PHP4 code into PHP5 applications. I use lots of PEAR packages, but just make them PHP5-only before using them. I look forward to when there will be an infrastructure to support coexisting versions in PEAR.It's not the initial effort that's bad, but the constant maintenance if people need to keep both a PHP 4 and PHP 5 release going.