Re: Re: [Fwd: cvs: pear /HTML_QuickForm_advmultiselect package.php]

From: Date: Tue, 18 Mar 2008 23:04:38 +0000
Subject: Re: Re: [Fwd: cvs: pear /HTML_QuickForm_advmultiselect package.php]
References: 1 2 3 4 5  Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-4840@lists.php.net to get a copy of this message
Greg Sherwood wrote:
Mark Wiesemann wrote:
Greg Sherwood wrote:
Mark Wiesemann wrote:
Laurent Laville wrote:
Running PHP_CodeSniffer 1.0.1 on my package still give an error 11 | ERROR | Package name "HTML_QuickForm_advmultiselect" is not valid;
     |       | consider "HTML_QuickForm_Advmultiselect" instead
Is it consider as a rule-break if I rename my package on a future release ?
    
Please don't do that, that would be BC break, causing problems with every script that uses your package. I'd consider this as PHP_CS bug. I don't remember (and can't find) a place on the website and in the manual where a package name is required to be written in this format, although this is the preferred format, of course.
Top of this page: http://pear.php.net/manual/en/standards.naming.php
Not really. Quote from there: "Classes should be given descriptive names. Avoid using abbreviations where possible. Class names should always begin with an uppercase letter. The PEAR class hierarchy is also reflected in the class name, each level of the hierarchy separated with a single underscore." There's nothing written about the requirement for an uppercase letter in the second, third, ... part. "pearweb" is indeed a violation, while Laurent's package seems to be okay.
The example names under the text that clearly show a multi-level class name with the first letter of each directory in uppercase; HTML_Upload_Error in this case
Just three examples, there could be a fourth example written like Laurent's package. There is also nothing written about the other characters behind the first letter, BTW.
The question really should be, if someone proposed a new class to PEAR with the name "HTML_QuickForm_advmultiselect" would PEAR require them to change the class name or would it be approved regardless? If it would be approved, then PHP_CodeSniffer should be changed to make it a warning instead of an error.
HTML_QuickForm_altselect (not _advmultiselect) was accepted in February 2007 (Laurent's package was accepted in June 2005). I don't remember a change in the CS in the last year about naming. Regards, Mark -- http://www.markwiesemann.eu

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