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

Request #13774 Make coding standards separate packages
Submitted: 2008-04-25 14:47 UTC
From: toxygene Assigned: squiz
Status: Wont fix Package: PHP_CodeSniffer (version 1.0.1)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2008-04-25 14:47 UTC] toxygene (Justin Hendrickson)
Description: ------------ The Zend Framework is developing it's own PHPCS standard files (http://framework.zend.com/svn/framework/trunk/incubator/tools/codingstandard/), but the name conflicts with the existing Zend standard in PHPCS. I think it would make sense to remove the current Zend standard, or make it into a separate package (or make all the standards into separate packages).

Comments

 [2008-04-25 22:32 UTC] squiz (Greg Sherwood)
The sniff files in this standard and an exact copy of existing sniffs distributed in the PHP_CodeSniffer PEAR package. The licence headers and author tags have been modified to make it look like Zend has written these standards, but this is my code. This is a violation of the BSD licence, which says that the copyright notice must be retained. If the Zend Framework would like to contribute some new sniffs, I'd be happy to include them in the PHP_CodeSniffer Zend package, which was already started by sniffs contributed by Zend. In the meantime, I'll have to find someone at Zend to talk to about this. Thanks for bringing this to my attention.
 [2008-04-26 14:11 UTC] blacksheepkhan (Thomas Weidner)
Just for clearification: The sniffs available are not from Zend they are only named "Zend". Zend has nothing to do with them nor has any framework developer. They even do not check the standard defined by Zend. Greetings Thomas
 [2008-04-26 22:17 UTC] toxygene (Justin Hendrickson)
I know the current 'Zend' sniffs have nothing to do with Zend or the Zend Framework specifically, but I did want to note that the Zend Framework was developing their own set of sniffs which _currently_ have the same name. Because of the conflict I thought I'd throw out the idea of splitting each standard into it's own package file. Not only would this, more-or-less, resolve the issue of the two sniffs having the same name, but it would also make it easier to change the PHPCS standards without having to make new releases of the core library when that happens. Also, on a side note, the files have been removed from the Subversion repository with a cryptic note about it not being for public view or something. *shrug* Anyway, keep up the good work, I love PHPCS!
 [2008-04-26 22:30 UTC] squiz (Greg Sherwood)
Making standards their own package is something I used to do with the PHPCS and MySource standards, but I could not get the PEAR installer to install the tests into the directory I wanted. That made unit testing a lot harder because I wrap PHPUnit with my own script so I don't have to write discrete unit tests for each sniff. So I decided to merge them in together to make life a lot easier for me :) I still want to do this one day, so I'm going to leave this feature open. And to answer the question about the current Zend standard, it formed initially because Johann-Peter Hartmann contibuted some sniffs he wrote to enforce parts of the Zend Framework coding standard as it as written at the time. I looked at the ZF standard and wrote the reaming sniffs. Around the same time, Holger Kral (from Zend) submitted the ZendCodeAnalyzer sniff. So I lumped all these Zend-related sniffs together to form the Zend standard. It was, however, not maintained, so it is not up-to-date. So it needs someone to maintain it, which is why I have offered Thomas commit access to PHPCS. If that offer is not taken up, I'll either remove the standard or keep it up-to-date from the ZF SVN repo.
 [2008-06-29 10:47 UTC] dufuz (Helgi Þormar Þorbjörnsson)
Greg if you like I can assist in splitting things up and make the tests install in the proper dirs, just send me an email or such and we'll figure it out.
 [2010-02-18 05:30 UTC] squiz (Greg Sherwood)
-Status: Assigned +Status: Wont fix
With newer changes to how standards can be created as external directories or ruleset.xml files, this feature is not required. Still a good idea, but not as necessary any more.