Re: Migration guidelines

From: Date: Thu, 05 Feb 2004 16:49:10 +0000
Subject: Re: Migration guidelines
References: 1  Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-487@lists.php.net to get a copy of this message
On Wed, Feb 04, 2004 at 09:14:03PM +0100, Tobias Schlitt wrote: > - Usage of __construct/__destruct. > In respect to BC, this should be left as is for the constructor (+ I > generally have something personal against __construct()). The usage of > __destruct seems not very regulatable. So you're saying that nothing changes here, unless it's a PHP5-only package, in which case '__construct' is prefered to 'ClassName()'. > - Function definition. > These defintions have to be changed in respect to & operator usage, > private public, as well as additions for interfaces and abstract > classes. A regulation of statics should be applied, too. I don't think there's much we can (or need to) do in terms of regulation here. Aside from explicitly marking '_'-prefixed members as 'private', everything else you list constitutes a functional and logical change to the class. In other words, none of this applies unless the author rewrites a good portion of his or her class to be PHP5 specific. > - We should set up some more naming conventions. More? Don't we have enough already! > As PEAR has a couple of packages now, we should extract "common namings" > for methods and definitifly define them. This will raise usability for > PEAR pretty much. Whenever someone eays "X will raise usability", I also wonder if they can back that up with some kind of hard data. The counter-case to your statement would be "Retaining the same APIs as the PHP4 PEAR classes will raise usability" is also true. Being they both "raise usability", which one will raise usability more? How do we quantify this and make an informed decision? > - The usage of __clone() should be defined. > It should be essential to have a __clone method implemented. I don't consider this essential. I'm +1 on allowing use of the default '__clone' implementation. If the default '__clone' implementation is unacceptable for the majority of classes, it should be brought up on the internals@ mailing list and changed. -- Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)

« previous php.pear.qa (#487) next »