wayf-dk / janus-ssp

Automatically exported from code.google.com/p/janus-ssp
Other
0 stars 0 forks source link

Create coding standard for JANUS #244

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We should define a coding standard for JANUS.

I surgest using the PEAR standard with a few minor changes, to allow the naming 
convention used in SSP.

We should ship JANUS with a coding configuration for PHP_CodeSniffer

Original issue reported on code.google.com by j...@wayf.dk on 15 Mar 2011 at 11:26

GoogleCodeExporter commented 9 years ago
You could use the Zend Framework coding standards. PHP_CodeSniffer has built in 
support for this...

Original comment by relaxno...@gmail.com on 12 Apr 2011 at 11:27

GoogleCodeExporter commented 9 years ago
I'll second that, not because it's the best just because it's widely adopted.

Original comment by vanliero...@gmail.com on 19 Oct 2011 at 7:27

GoogleCodeExporter commented 9 years ago
Zend standard it is. I guess that all code should be parsed through 
PHP_CodeSniffer with the Zend standard. I am not sure if this will cause to 
much trouble, but we will see.

Original comment by j...@wayf.dk on 3 Feb 2012 at 2:00

GoogleCodeExporter commented 9 years ago
Bumped to next release

Original comment by j...@wayf.dk on 25 Apr 2012 at 12:40

GoogleCodeExporter commented 9 years ago
Nice! You might also want to look at PSR-1 and PSR-2 (sorry, on a mobile 
device, no link) which is derived from Zend and Symfony and supports namespaces 
and is on track to be accepted at least by Symfony.

Original comment by relaxno...@gmail.com on 23 May 2012 at 9:10

GoogleCodeExporter commented 9 years ago
I have already looked at PSR-1 and 2. Personally i think that this will be the 
standard in the future. We might have a few problems, since SSP do not support 
PSR-1 and 2. Both PSR-1 and 2 actually requires the use of PSR-0, setting the 
standards for classnames etc., so we will not be able to be fully PSR-1 and 2 
compliant. This can only be done if SSP adopts PSR-0. 

I think that we should adopt the PSR-1 and 2 (they are already been votes 
through and should be up on github within a few weeks). There will be 
PHP_CodeSniffer packages to enforce it and a tool for converting existing code 
to PSR-1 and 2 compliant code in the pipeline from some one in the php-figs 
group.

Please raise your voice for or against on this issue.

https://github.com/php-fig/fig-standards
https://github.com/pmjones/fig-standards/tree/psr-1-style-guide/proposed

Original comment by j...@wayf.dk on 24 May 2012 at 8:19