Migration guidelines

From: Date: Wed, 04 Feb 2004 20:14:03 +0000
Subject: Migration guidelines
Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-484@lists.php.net to get a copy of this message
Hi! I guess setting up some migration guidelines would be a good idea. In respect to PHP5 code we can preset some new coding standards and (hopefully) adjust some of the old ones slidely. Here is, what I propose to take care of in those "PHP5 migration and coding guidelines" and how the should be realized. Everything in this mail is naturally IMHO. The regulation of PHP5 migration aspects is an essential task for QA. Since not all o PEAR codingstandards (CS) will be necessary and some of them have to be changed for that migration, I propose to build up a new version of the CS and to give developers a guideline they should follow while migrating their code. This guide should contain new, PHP5 related CS, a common standard definition of the usage of PHP's new features. In general we should take care of the followning (in no specific order): - 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. - 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. - We should set up some more naming conventions. 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. - The usage of __clone() should be defined. It should be essential to have a __clone method implemented. - Either something should be build around or the usage should be regulated for __autoload(). I like this feature pretty much and I guess this could be implemented in one piece for the complete PEAR framework. That'd be cool! :) - __get and __set should be regulated, as well as the usage of __call. - The handling of type hinting should be regulated. Waiting for your feedback! Regards, Toby -- Tobias Schlitt a passion for php http://www.schlitt.info

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