Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Phil Sturgeon:
PSR-2 v CodeSniffer PSR-2: A Success Story
Oct 16, 2013 @ 14:34:15

In a new post to his site Phil Sturgeon talks about the "success story" around the PSR-2 PHP-FIG standard and his work to get the PHP CodeSniffer checks to be more correct for it.

I've had static analysis tools running in Sublime Text for a long time, but for most of that time I have had CodeSniffer and it's PSR-2 rules disabled. I couldn't for the life of me remember why I had done that, until I turned it back on again. All of a sudden it started complaining about code that I had always considered to be perfectly compliant. It reminded me of multiple conversations I've had with others in the FIG and the community in general, about how CodeSniffer often enforces rules in the PSR-2 spec that do not exist, or were not what was meant when it was written. Two months ago I set off on a mission, to get CodeSniffer in line with what PSR-2 really is.

He gets into a bit of the backstory around the checks and the addition of "Errata" to add to the specs that have already been defined. The goal isn't to alter what's been defined, but to help clarify some issues (or close some loopholes) that might have come up. After polling the PHP-FIG mailing list about it - and it passing unanimously - the Errata was added and the CodeSniffer rules were updated to match (PHP_CodeSniffer 1.4.7).

If you're interested in other unclear places in the PSR-2 spec and want to discuss it, check out this gist and the conversation that goes with it.

tagged: psr2 codesniffer rule clarity errata phpfig

Link: http://philsturgeon.co.uk/blog/2013/10/psr2-v-codesniffer-psr2

Rob Allen's Blog:
Zend Framework in Action forum and errata
Feb 10, 2009 @ 16:21:41

Rob Allen has a quick update posted to the PHP in Action blog concerning the site's forum and errata sections.

Although I'm not posting here much at the moment, I am answering questions about my Zend Framework book in Manning's Author Online forums. [...] Also, I have started posting up the errata that we have found on the book's website. If something doesn't make sense, check there first!

Those forums are quite a busy place with topics about specific parts of chapters to more general Zend Framework questions.

tagged: zendframework book action forum errata authoronline manning

Link:


Trending Topics: