Re: PEAR_ErrorStack renaming question

From: Date: Fri, 03 Sep 2004 03:17:30 +0000
Subject: Re: PEAR_ErrorStack renaming question
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-33195@lists.php.net to get a copy of this message
Sergio Carvalho wrote:
Hi, I understand you're saying that PEAR_ErrorStack should continue as an error handling for PHP4, while being extended so it can easily transform non-fatal errors into warnings in mixed PHP4/5 environments. I'd like to clarify that I find this a-ok. When I proposed that PEAR_ErrorStack should be renamed, I was doing so in the context of pure PHP5 environments. I do so, because PEAR_ErrorStack closely matches the set of features required for a warning handling class. However, in this environment (pure PHP5) it makes no sense to have a PEAR_ErrorStack, since errors are handled by exceptions. The warning handling class should be named PEAR_Warning. In other words, I'm saying that I believe once the requirements for a PEAR_Warning class are defined, we'll find out most of them can be implemented with code lifted from PEAR_ErrorStack. However, the first step in this direction is clearly defining the API of the PEAR_Warning class. You have a very good grasp of these concepts. Do you think you could launch the discussion with draft requirements and API spec? An email will do. If the discussion is too confuse in the list, it can then be moved to a wiki.
Not only do I plan (currently) to implement PEAR_Warning as code lifted from PEAR_ErrorStack, I plan to make them use the same stack, if possible, so that moving from PEAR_ErrorStack to PEAR_Warning (for those who are re-factoring php4/php5 apps to php5-only) will be painless for both the developers and the end-users. Actually, I am patient enough to implement this not in a wiki, but in code first. By this, I mean that I will change the implementation over and over again when people take the time to look at it and make suggestions. If I have a fault, it is that I often don't see the logic in someone's suggestions until I've slept on them, so for all of you who have been on the receiving end (and may be in the future) of "I don't think that is the right way" and then seen your suggestions show up in CVS the next day, I apologize now :). Basically, once there is a code possibility, I think the RFC will be a piece of cake. Greg

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