Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.6.0a3

Request #15139 PHP_Compat does not comform to PEAR CS
Submitted: 2008-11-24 10:27 UTC
From: aidan Assigned:
Status: Verified Package: PHP_Compat (version 1.6.0a2)
PHP Version: Irrelevant OS: N/A
Roadmaps: 1.6.0a3    
Subscription  


 [2008-11-24 10:27 UTC] aidan (Aidan Lister)

Comments

 [2009-01-06 20:11 UTC] hm2k (James Wade)
URL appears to be down. There is Google Cache though, follow the links: http://www.google.co.uk/search?q=http%3A%2F%2Fpear.cweiske.de%2Fcodingstandards%2FPHP_Compat.html Perhaps someone can get the code for the "Coding Standards Report" script? Need to speak with cweiske I guess. It seems that according to the CVS this has already been attempted/resolved, can it be checked?
 [2009-05-01 21:34 UTC] hm2k (James Wade)
The URL appears to be online now. However, I'm looking at it now, and wondering when it was generated since it says: /data/pear/pear/PHP_Compat/Compat/Constant/DATE.php error 2 You must use "/**" style comments for a file comment Sum 1 errors and 0 warnings I checked this file, and as far as I can see that file DOES already use /** style comments for the file comment. Is there any way we get request this to get regenerated or run our own? Perhaps cweiske can assist us here as previously mentioned... https://pear.php.net/user/cweiske
 [2009-05-01 21:39 UTC] hm2k (James Wade)
Read: http://pear.cweiske.de/ "This page is here for historically purposes only. Data do not get updated anymore! Try Daniel's page." Daniel's page: http://www.lauken.com/doconnor/phpcs.html The problem with this, is there's not as much detail as cweiske's site, so there's no actual way of knowing what the issues are... Further more it seems it was last updated 2009-01-16... Are we able to generate our own reports?
 [2009-05-04 19:08 UTC] hm2k (James Wade)
Yes, using PHP_CodeSniffer., like this: phpcs --extensions=php --report=xml Compat > report.xml I also figured that most of these errors could be fixed by using PHP_Beautifier... php_beautifier -r "Compat/*.php" ./pretty/ One issue is that PHP_Beautifier doesn't appear to fix "Header Comment Blocks" as per this proposal: http://pear.php.net/pepr/pepr-proposal-show.php?id=128 I will report this issue to PHP_Beautifier.
 [2009-05-06 16:15 UTC] hm2k (James Wade)
I opened a bug report with PHP_Beautifier http://pear.php.net/bugs/bug.php?id=16178 However, PHP_Beautifier does not handle "Header Comment Blocks" or DocBlocks, there is PHP_DocBlockGenerator http://pear.php.net/package/PHP_DocBlockGenerator/ However, this also has it's fair share of issues... http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PHP_DocBlockGenerator Although most of the issues identified by PHP_CodeSniffer could be fixed manually, it hardly seems worth while when it can be done automatically by such tools. I await responses from the package developers.
 [2009-05-07 03:04 UTC] arpad (Arpad Ray)
-Status: Open +Status: Verified
 [2010-08-02 18:09 UTC] hm2k (James Wade)
As soon as I am able to commit to the PHP_DocBlockGenerator source code I will invest some time resolving this issue.
 [2011-09-07 02:26 UTC] hm2k (James Wade)
I've commited some bug fixes to PHP_DocBlockGenerator now. I wrote a little helper script to fix common problems identified by phpcs: * https://hm2k.googlecode.com/svn/trunk/code/shell/phpfix.sh It's not perfect but it does help somewhat. php_beautifier and docblockgen is going to require a lot more work to fix all these files automatically. In the meantime I will be fixing many of the issues manually. I have also spoken to cweiske to see if we can get the code that generates the "codingstandards" html files, making it easier to visualise the issues.