Re: Template ? focus on PHP5
| From: | Philippe Jausions | Date: | Mon, 05 Jul 2004 04:45:29 +0000 |
| Subject: | Re: Template ? focus on PHP5 | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-31579@lists.php.net to get a copy of this message | ||
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. I'm not sure the PEAR Group has come to a final decision about new packages not compatible with PHP4. 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...
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.
b) use extra arguments for warnings ?? - until a lightweight warning mechansim can be worked out.. Couldn't we use PEAR_ErrorStack for that too?
c) use all the protected / private etc. d) Type HintsSounds 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... -Philippe