A Symfony pack for initializing quality tools in your project.
composer require fastfony/quality-pack --devThis pack includes the following tools and configurations:
- PHPStan - PHP Static Analysis Tool
- PHP CS Fixer - PHP Coding Standards Fixer
- Twig CS Fixer - Twig Coding Standards Fixer
When using Symfony Flex, the recipe provides the following configuration files:
.twig-cs-fixer.dist.php- Twig CS Fixer configuration (automatically added by recipe).github/workflows/quality.yml- GitHub Actions workflow (automatically added by recipe)Makefile- Quality command shortcut (automatically added by recipe)
Configuration files for PHPStan and PHP CS Fixer are provided by their respective Symfony Flex recipes.
If you're not using Symfony Flex, you can manually add these files to your project.
A GitHub Actions workflow example is provided in .github/workflows/quality.yml that runs:
- Security checks (using Composer Security Audit)
- PHPStan analysis
The workflow runs on all pushes and pull requests to all branches.
Run static analysis:
vendor/bin/phpstan analyseCheck code style:
vendor/bin/php-cs-fixer fix --dry-run --diffFix code style:
vendor/bin/php-cs-fixer fixCheck Twig templates:
vendor/bin/twig-cs-fixer lint templates/Fix Twig templates:
vendor/bin/twig-cs-fixer lint --fix templates/You can customize the configuration files according to your project's needs. Each configuration file is well-documented and follows best practices.
MIT