phpro / symfony-conventions
GrumPHP conventions for Symfony projects at PHPro
Installs: 20 282
Dependents: 1
Suggesters: 0
Security: 0
Stars: 6
Watchers: 3
Forks: 2
Open Issues: 0
Type:package
Requires
- php: ^8.1
- brianium/paratest: ^6.3|^7.0
- php-cs-fixer/shim: ^3.57
- phpro/grumphp-shim: ^2.0
- phpunit/phpunit: ^9.5|^10.0|^11.0
Requires (Dev)
- azjezz/psl: ^2.1
Suggests
- phpstan/phpstan: Static analysis
- psalm/plugin-symfony: Static analysis
- roave/security-advisories: Security
- symplify/phpstan-rules: Object calisthenics
- vimeo/psalm: Static analysis
README
This package is to be required on all PHPro's symfony based projects.
Installation
With symfony/flex
composer config --json extra.symfony.allow-contrib true composer config --json extra.symfony.endpoint '["https://api.github.com/repos/phpro/symfony-conventions/contents/index.json", "flex://defaults"]' composer require --dev phpro/symfony-conventions
Without symfony/flex
composer require --dev phpro/symfony-conventions
You can copy the config files from the configs/
directory to the root of your project.
Optional packages based on project requirements:
Note: If you already have these dependencies installed, you might have to run the flex recipe only:
composer recipes
composer recipes:install THE/DEPENDENCY --force -v
composer audit (security-advisories)
# grumphp.yaml parameters: run_security_advisories: true
You might want to alter the default composer audit configuration in your local composer.json file.
For example if you don't want to fail CI on usage of abandoned packages:
{ "config": { "audit": { "abandoned": "report" } } }
See official docs for more information.
phpstan/phpstan
composer require --dev phpstan/phpstan phpstan/extension-installer symplify/phpstan-rules
# grumphp.yaml parameters: run_phpstan: true
vimeo/psalm
composer require --dev vimeo/psalm psalm/plugin-symfony
# grumphp.yaml parameters: run_psalm: true