Re: Comments about PHPTAL package proposal?
| From: | Markus Tacker | Date: | Sun, 19 Apr 2009 13:44:57 +0000 |
| Subject: | Re: Comments about PHPTAL package proposal? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-51755@lists.php.net to get a copy of this message | ||
Kornel,
2009/4/19 Kornel Lesiński <kornel@aardvarkmedia.co.uk>:
> I haven't got any comments about PHPTAL. Shall I assume it's perfect? ;)
> http://pear.php.net/pepr/pepr-proposal-show.php?id=597
> http://phptal.motion-twin.com/files/PHPTAL-1.2.0a5.tar.gz
Some thoughts:
- use System_Folders to retrieve temporary folder
- do not prefix your includes with PHPTAL_DIR (require_once
PHPTAL_DIR.'PHPTAL/FileSource.php';) this is handled by the system
configuration. In PEAR packages we just use require_once
'PHPTAL/FileSource.php';
- use class constants instead of global statics.
- PHPTAL_XHTML and PHPTAL::XHTML are the same?!
- put class properties on beginning of class
- public properties should not be prefixed with '__' (public $__file = false;)
- return values of methods are not documented
- mention PHP version dependency in package.xml
- initial release of a package should not be "stable" but "beta".
- initial release version should not be PHPTAL's but adhere to PEAR's
versioning scheme [1], e.g. 0.1.0
- there are no tests
In general: Use phpcs [2] to check if your code adhers to PEAR's
coding standards.
[1] http://pear.php.net/group/docs/20040226-vn.php
[2] http://pear.php.net/manual/en/package.php.php-codesniffer.php
--
mit freundlichen Grüßen
Markus Tacker
kontaktdaten ~ http://m.tacker.org/kontakt
coder::by(♥);