Re: Re: Template ? focus on PHP5

From: Date: Tue, 06 Jul 2004 07:06:46 +0000
Subject: Re: Re: Template ? focus on PHP5
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-31614@lists.php.net to get a copy of this message
On Jul 5, 2004, at 6:45 AM, Philippe Jausions wrote:
Alan Knowles wrote:
I was hacking away at the Compiler backend for Template the other day, and it became clear that there is alot more work in refactoring the Flexy code (let alone looking at the Block Backend) Considering this may take many months before it delivers anything more than what Savant currently is, what are your thoughts on making Template a PHP5 only package?.
I see your point. Can't really propose an incomplete template package to replace existing ones, otherwise it's just like adding a new template package and there are already too many of them in PEAR... But all-in-all, IMHO, time delay is not a reason good enough to go PHP5 only.
Why not ?
I'm not sure the PEAR Group has come to a final decision about new packages not compatible with PHP4.
I don't think that the PEAR Group has the intention to limit the development of PHP 5 only packages. There are different point of views, but since there are already some PHP 5 only packages and proposals are growing on this direction all seems fairly clear to me.
Since Template could be working with PHP4, let's stick it with that for now. On the other hand, I'm all for embracing PHP5 as soon as possible...
Umh Philippe I might be wrong but you can't "stick with PHP 4" and "embrace PHP 5" at the same time. Users need some good examples of PHP 5 code and as PEAR is the official repository it seems an obvious step to provide these packages. Of course every developer has the freedom to stick with PHP 4 or work in what is now PHP: PHP 5.
eg. a) Throws PEAR_Exception, on anything that could cause the using application problems.
I think we could leave it up to PEAR_ErrorStack to throw the exception under PHP 5 and eventually return a PEAR_Error on PHP4, although, it would be best to clear away from PEAR_Error and simply return TRUE/FALSE and use PEAR_ErrorStack... I'd like to minimize the use of Exceptions for error handling. I respect your point but there is already a PEAR_Exception experimental class (thanks Cox) and the right way in PHP 5 is to properly use the Exceptions so I don't think that again we can tell people to use PEAR_ErrorStack in lieu of exceptions.
snip
Sounds like an "easy" conversion that don't really have to make the package PHP5 from the start... But I really like the idea of using better OOP semantics. Having a stable PHP4/PHP5 version first would be good. Once done, turning it into PHP5 E_STRICT shouldn't be too painful ;-) While it may take time to have the package ready, it will also take time for PHP5 to be widely used. Most web hosting providers will wait for a couple of stable releases before offering it...
and they will have no reason to switch if we do the stick with PHP 4. I wouldn't write a package in PHP 4 and then porting it to PHP 5 but of course is Alan's choice ;) Cheers David Costa

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