symfony1 icon indicating copy to clipboard operation
symfony1 copied to clipboard

Coding Style

Open zobzn opened this issue 7 years ago • 2 comments

What do you think about PSR-1/2 and friendsofphp/php-cs-fixer ? When possible (spaces, braces, etc... without breaking changes such as introducing namespacing)

zobzn avatar Dec 16 '16 14:12 zobzn

Why not, it'll generate a huge PR with lot of changes. And as far as I remember symfony1 used a custom CS which compatible with a PSR.

j0k3r avatar Mar 09 '18 08:03 j0k3r

I think true PSR-compatibility is impossible, since PSR-2 requires PSR-1 which requires PSR-0 or PSR-4, both of which are incompatible with symfony's classloading patterns.

If there's a way to make a phpcs config file that says "enforce (and/or autofix) all of PSR-1/2 except for the namespacing/classloading stuff", that would be valuable not just for symfony1 itself but for any symfony1 projects.

mkopinsky avatar Mar 09 '18 14:03 mkopinsky