Closed drupol closed 3 years ago
Hi @drupol, honestly I don't know if this PR will be merged.
For Code Style, we already have this package for our organization and I'll implement it.
I need time to take a look on this PR.
It's just a proposal, feel free to use it or not, it's the same for me, I'm not offended at all in any case!
Closed for #16
Hello,
Just like you, I also publish PHP libraries and Symfony bundles. Over the years, the need for a clean code has arisen.
Then, I created a package: drupol/php-conventions.
It's based on Grumphp and provides a default configuration for it.
In this context, Grumphp is configured to execute multiple tasks. Those tasks can be executed seamlessly on local or on CI, with the same syntax.
Example:
To run the code style:
./vendor/bin/grumphp run --testsuite=cs
Output:To run the code static analysis :
./vendor/bin/grumphp run --testsuite=static-analysis
You can find an example of use of this package on those projects: ecphp/cas-lib, ecphp/cas-bundle, loophp/collection, gravataLonga/container... There are projects of mine and contrib projects who adopted this package.
Grumphp comes with PHP-CS-Fixer and PHPCS tasks enabled and working together without conflicts. In order to do that, I've spent quite a lot of time adjusting the PHP-CS-Fixer rules (I created a package just for that). Those php-cs-fixer rules are based on PSR2, PSR12 and Symfony rules and some custom adjustments.
This PR is a proposal to use this package as a dependency.
Let me know what you think of the idea.