Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PHP-CS-Fixer with the Symfony2 coding standards #8

Open
xiehan opened this issue Nov 7, 2017 · 1 comment
Open

Add PHP-CS-Fixer with the Symfony2 coding standards #8

xiehan opened this issue Nov 7, 2017 · 1 comment

Comments

@xiehan
Copy link
Contributor

xiehan commented Nov 7, 2017

NPR used to have its own handcrafted PHP standards (briefly explained here), but last December we decided to adopt the Symfony2 coding standards and enforce them using PHP-CS-Fixer with a pre-commit hook in order to reduce the time spent during code reviews on pointing out standards violations. This practice has been very successful and is worth rolling out to our other codebases, particular open source ones like this one. It'd be great if we could similarly have our coding style enforced at commit time so that we don't even need to have a section on style in our CONTRIBUTING.md doc and can instead just assume that any commits to this codebase follow our standards.

@xiehan
Copy link
Contributor Author

xiehan commented Sep 27, 2018

I've just added milestone v3.0.0 which will drop support for PHP 5.6 and 7.0 at the end of the year, so I think we should target PHP 7.1+ with this setup -- don't optimize for or bother to get it working with PHP 5.6 at this stage.

@xiehan xiehan added this to the v3.0.0 milestone Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant