Re: Re: PEAR's Error Handling and PHP5

From: Date: Wed, 21 Jun 2006 20:07:05 +0000
Subject: Re: Re: PEAR's Error Handling and PHP5
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-43070@lists.php.net to get a copy of this message
Alexey Borzov wrote: > Hi, > > Amir Mohammad Saied wrote: > >> Hmm, Honestly I'm not in favor to force exceptions usage here in PEAR >> but to leave the choice to the developers? I know PEAR packages are for >> all of us (pear developers) but I don't think we have enough rights to >> _FORCE_ them to do foo because of bar jut because I want it. > > Yes we can. That's called "coding standards" and these mandate using > PEAR_Error for error handling in PHP4 packages and exceptions in PHP5 > packages. This particular standard was introduced after the relevant RFC > was accepted: > http://pear.php.net/pepr/pepr-proposal-show.php?id=132 > > If you want to change it, write another RFC. The RFC was just barely passed (if you count conditional votes). I feel that such critical piece of standard should be accepted in a landslide, such as with the recent Shell package ;-) And since the PEPr system doesn't put a higher barrier for critical proposals, that RFC is what we have. It is also interesting to note, how many zero votes were balloted. IMO the problem comes from the fact that the installed base for PHP5 is relatively small, and the ones using PHP5 are most likely also using PHP4 PEAR packages, and are juggling PEAR_Error and PEAR_Exception. The reality of web hosting and distro makes it difficult to have a *lot* of people actually making use or knowing how to use exceptions. You have to remember that some people are still relying on register_globals, no matter how dumb this is (for them PHP6 will be well beyond any forseable future, but then again, maybe they could stick with PHP3 ;-p) I'm pretty sure a lot of us wish we could use PHP5 in our daily work, but the reality is that we don't have that luxury, and therefore don't gain enough experience with exceptions to make the perfect decision regarding the RFC. So to the question: "Must PHP5 packages use exceptions for all report handling?", my answer is "I don't know yet". Some people may know, but being a critical standard-defining RFC, "some" is not enough in that case. -Philippe

« previous php.pear.dev (#43070) next »