Re: Status of PEAR_ErrorStack5.php

From: Date: Wed, 20 Sep 2006 14:43:30 +0000
Subject: Re: Status of PEAR_ErrorStack5.php
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-43986@lists.php.net to get a copy of this message
Alan Langford wrote: > I have found PEAR_ErrorStack5.php in CVS (pear-core). It is a more "PHP5 > native" version of PEAR_ErrorStack.php, but it still uses many > pre-version 5 constructs (for example, global constants). It's also > somewhat out of date -- with a CVS Id in 2004 -- and lacking some > features in the distributed version (oddly, I see it as passing all the > QA tests, but there are some cases where I expected failure... I'm > working on determining why). > > This file is not present in the distributed version (a good thing IMO). > > Is this file being maintained? I have been working on adapting it to use > everything PHP5 has to offer, but as soon as I start rolling constants > into the class, there is no hope of maintaining BC. > > This message is really just a request for confirmation that I understand > the relevant policies and naming conventions. Given that I'm really > insane enough to continue this process, it seems to me that the correct > name for a replacement file would be PEAR_ErrorStack2.php, the updated > QA suite would live in the tests/PEAR_ErrorStack2 directory and the > package would be PEAR_ErrorStack2-0.1.0. Am I correct? PEAR_ErrorStack5.php was a proof-of-concept to show that by changing about 20 characters, PEAR_ErrorStack would become PHP5 E_STRICT compatible. Of course, now that var is allowed again, the number of characters has changed to even fewer (just defining static methods as static, and removing assign by ref for new). This was back when the ideologues were saying all kinds of BS FUD about PEAR_ErrorStack. The file has not been touched since then, but I wanted to keep it around. A more interesting alternative imo is in PEAR/Warning.php, a PHP5-based implementation of non-exceptional errors that allows easy promotion to exceptions and demotion of exceptions. It also has the advantage of not needing to be loaded prior to use (encasing calls in if class_exists() is enough) Greg

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