DevPack for Symfony
This is a Flex pack to install multiple dev tools.
On Symfony, we create a project rapidly using composer :
composer create-project symfony/skeleton
But, for some time, when I start a new project, I add dev-dependencies to improve code quality and keep it in the long run, so I grouped them in this pack with pre-configured files.
It allows me to have clean codes rules to share with project team, and avoid useless discussion in Code Reviews.
Installation and usage
For the following, I assume you just freshly created a new Symfony Project.
Require the pack as dev dependency
composer require --dev barth/dev-pack
You now have my list of dev tools, with preconfigured files. Don't hesitate to alterate with your settings or feel free to fork this repo to have your own list and settings.
Cleaning / Unpack
Because it's a symfony-pack, you may want to unpack it to keep only required dependencies and no more barth/dev-pack in your composer.json.
To do this properly, unpack it after install:
composer unpack barth/dev-pack
Then, you can also remove endroid/installer which provides a composer plugin to copy file from my pack.
composer remove --dev endroid/installer
List of installed packages
This is the most well-known tool in the PHP community, configured with PSR2 ruleset.
This tool focuses on the form of the code. Here are the different rules it enforces:
- Clean Code Rules: Do not pass a boolean as a parameter of a function, avoid
elseand access in
- Code Size Rules: A class too long, a method that takes too much parameter, a function too complicated, it's here that it happens.
- Controversial Rules: Controversial rules... They focus on naming, especially through the use of CamelCase.
- Design Rules: A collection of rules that detect problems with software design.
- Naming Rules: Rules on names of variables, methods, classes - too long, too short, etc.
- Unused Code Rules: Detects unused pieces of code.
This tool will not avoid us (or very little) return code reviews, but ensures that our dependencies installed via composer do not contain known security vulnerabilities.
Very useful to refactor code and avoid having identical pieces of code in several places of a project.
Similar to PHP CodeSniffer, it offers in my opinion a simpler configuration, and fixes errors in a command line.
Allows to orchestrate all these tools on the precommit hook.
First of all, thank you for contributing
Keep in mind that if you add tools, I certainly accept only if fits with my own needs. Don't hesitate to fork this project to fit with your organization needs.
The MIT License (MIT). Please see License File for more information.