fastfony / quality-pack
A Symfony pack for initializing quality tools in your project
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:symfony-pack
pkg:composer/fastfony/quality-pack
Requires
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^2.0
- vincentlanglet/twig-cs-fixer: ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^2.0
- vincentlanglet/twig-cs-fixer: ^3.0
README
A Symfony pack for initializing quality tools in your project.
Installation
composer require fastfony/quality-pack --dev
What's included?
This 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
Configuration Files
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.
GitHub Actions Workflow
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.
Usage
PHPStan
Run static analysis:
vendor/bin/phpstan analyse
PHP CS Fixer
Check code style:
vendor/bin/php-cs-fixer fix --dry-run --diff
Fix code style:
vendor/bin/php-cs-fixer fix
Twig CS Fixer
Check Twig templates:
vendor/bin/twig-cs-fixer lint templates/
Fix Twig templates:
vendor/bin/twig-cs-fixer lint --fix templates/
Customization
You can customize the configuration files according to your project's needs. Each configuration file is well-documented and follows best practices.
License
MIT