ZF-691: Coding Standards Version 1.0


Concerning the document located here:

We should should round out the details of this document and get it beyond release candidate and move it into the documentation.

A few things that need to be added or addressed: * Standard stock doc blocks for copy and paste purposes (page docblock, class docblock) * A more definitive guide on doc blocking... aim to standardize * Exception section updated to current standards * [other isses will be attached to this one]

Once this document is finalized (V1), i propose we evaluate all production (non-incubator code) and clean it up per the standards.


Updated link

We might want to address array keys (e.g., component options) in the coding standard. A camelCase standard would correspond with already adopted variable and method naming conventions, though we would need a backward compatibility layer for many components that use the under_score naming convention for array keys.

We should include View Script (as well as Application code, Bootstrapping code, or any user code) best practices in this documentation.

Perhaps we should have a split in this document.

Part 1 would be for library coding standards Part 2 would be for application coding standards

There should also be a standard for API docblocks. The actual situation is a quirks because everyone does his own.

Regarding coding standards in general it would be great to have a tool which does the check and returns standard-breaks to be fixed. But it should met ZF standard... a sort of modified phpbeautifier ;-)

Resetting 'fix version priority' and 'fix version' to be re-evaluated for next release.

For completeness the draft for the new standard can be found here:…

Status? And if Thomas is doing work on this, let's break out his tasks in to subtasks and assign them to him.

I've already created the CodeSniffer ruleset based on the old PHP Coding Standard from Darby and the new ZF Coding Standard from Ralph and me.

You can already try it out in the incubator under "tools". Actually it finds about 160.000 errors and is very strict in it's tests. It's not 100% finished but it gives already a good overview.

Updating to comply with new IT component conventions.