[TYPO3-core] CGL proposal: Include PSR-1 Side Effects-Rule

Jigal van Hemert jigal.van.hemert at typo3.org
Sun Oct 21 12:14:53 CEST 2012


Hi,

On 20-10-2012 23:39, Andy Grunwald [wmdb] wrote:
> currently, we (the PHP_CodeSniffer-Team [1]) evaluating [2] the PSR-1
> standard of the PHP Framework Interoperability Group (PHP-FIG) [3] for
> TYPO3v4.
>
> This standard creates a recommendation about PHP files which contains
> Classes / Interfaces / Functions / Constants AND executable code like
> (ini_set, ...). This recommendation is called "Side Effects".
>
> Here is the rule (for lazy people who dont want to click [3] :)):
>
> ==================================
> 2.3. Side Effects
>
> A file SHOULD declare new symbols (classes, functions, constants, etc.)

The magic word here is "SHOULD". I'm pretty sure a code sniffer cannot 
judge whether "there may exist valid reasons in particular circumstances 
to ignore" (quote from RFC 2119) the rule.
The result is that a code sniffer cannot enforce such a rule.

-- 
Jigal van Hemert
TYPO3 Core Team member

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-team-core mailing list