Re: Making a release

From: Date: Fri, 05 Mar 2004 12:33:40 +0000
Subject: Re: Making a release
References: 1 2  Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-832@lists.php.net to get a copy of this message
Hi,
1) The examples should go into docs/examples/ Please have a look at the package directory structure: http://pear.php.net/group/docs/20031114-pds.php This is done automatically during packaging!
<file role="doc" baseinstalldir="XML" md5sum="9be3f6bd9bafb815b011362a1c20436f" name="examples/example_browser.php"/>
2) Since createDocument is static, please provide a @static-tag in The whole class is being marked as static.
3) In createDocument: Maybe remove the unneeded spaces behind "$doc =". One space before and one after the equal-sign is enough ... though this is surely no real CS-issue ... just a suggestion. Similar things at other places also. Maybe because you replaced tabs with 4 whitespaces. Done.
4) Regarding XUL/Document.php: imho "enableValidation()" with a parameter of false to disable validation shounds a bit strange. But I haven't got a better name atm. Maybe "setValidation()" to be consequent to your other API- functions? It's disabled by default, so you'll mostly call enableValidation() without a parameter.
enableValidation() will in most cases only be used during testing, so there's seldomly a need to disable it again...
5) In XML_XUL_Element you let people access $replaceEntities directly (public attribute) but e.g. for validation you encapsulate the validation with an "enable" function-call? Is the replacing used less often or why did you decide to let it be set by the user directly? replaceEntities is currently not needed and when it is needed it will be needed it's only for a more profesional use... So there's no method for this.
6) Since you have a method serialize(), would it be an idea to maybe also have unserialize() for loading a stored XUL again? Don't know about the background ... just generally had the idea ... Not again :-)
I discussed this with Alan :-) There will be a method to read serialized XUL documents, but it will be XUL::loadFile() and XUL::loadString().
7) In validateAttributes() you don't need to do a reset($this->attributes); at the beginning. This is already done automatically by foreach, refering to http://de.php.net/foreach removed.
8) In lastChild(): Imho you don't need the { } around $cnt-1, since the [] when accessing the array already encapsulate. I think it improves readability....
9) Do you need all elements as separate objects / files? Since, as I see it, $elementName always has the last part of the class name maybe you could live fine with just a few classes? Or do you plan additional implementations in all classes? If you plan additional implementations, maybe it would be possible to avoid $elementName since you can always digest it from the class name? I discussed this with Alan, too :-)
There will be additional methods for most of the elements. And I'll keep the elementName property as it's more flexible. You could always come up with any object that has some special features but creates the same XUL tag... Furthermore it's faster that extraction the last part from the classname...
So from my side I didn't find any grave bugs ... just wrote down some suggestions I head. All in all: Well done! I think most of this stuff could have been (and some already has been) discussed during the proposal phase. I'm not quite sure what the tasks of the QA team is in detail... But thanks nevertheless for checking the code.
Stephan

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