djoos / Symfony-coding-standard

Development repository for the Symfony coding standard
MIT License
401 stars 102 forks source link

Refactoring #32

Closed djoos closed 7 years ago

djoos commented 9 years ago

"The Zend ruleset isn't a complete standard (just a collection of a few sniffs that Zend people submitted many many years ago) so it's highly unlikely that you want to be doing that. Cherry pick the specific sniffs that you want so you don't choose any that conflict with each other." @todo take a step back and build the coding standard rules up from scratch

wickedOne commented 7 years ago

is it just the zend ones you want to get rid of, or also the pear standards which are included?

djoos commented 7 years ago

Hi @wickedOne,

with hindsight it's not necessary a matter of having to get rid of any... More a case of fully understanding what each of the imported ones brings to the table - ideally to come to a place where it's easy to validate that the standards laid out in the Symfony docs are all adhered to.

At the time I thought of really stripping things back - however it might be a case of expanding the tests of the repo to include each standard mentioned.

wickedOne commented 7 years ago

hi @djoos

sounds reasonable to me! i'd suggest to include all psr standards by default and continue to "borrow" sniffs from standards like zend / pear if they're outside the psr definition, but inside the symfony standard and migrate them into this repo once it appears they have a bug which won't be fixed at their original location.

noticed that there are quite some updates to the mentioned symfony docs since the last time i've wrote sniffs for this repo. i'll see whether there are some easy ones to implement once i'm done with #61 (of course they'll be submitted in seperate prs).

we might want to consider a "list" of missing sniffs (perhaps just open them as issues?) so it's clear what's actually checked and what still has to be done...

lastly: what's your sentiment to supporting multiple phpcs versions? you'd think new sniffs should be compatible with both phpcs 2 and 3, or will you freeze the 2.10.1 tag as the last phpcs 2 compatible sniffs and just do some additional bugfixing to them?

wickedOne commented 7 years ago

i guess this one can be closed as #69, #68 and #66 are resolved?