Skip to content

Latest commit

 

History

History
79 lines (53 loc) · 1.8 KB

File metadata and controls

79 lines (53 loc) · 1.8 KB

Contributing

This project is part of the Symfony ecosystem and follows the Symfony Contribution Guidelines.

Running Tests

This project uses PHPUnit Bridge to run the tests.

Install the required dependencies with:

composer install

To run the tests, use the following command:

./vendor/bin/simple-phpunit

Static Analysis

This project uses PHPStan for static analysis. To run PHPStan, use the following command:

Install the required dependencies for the project, PHPStan itself and the extra packages that the project uses:

composer update
composer update --working-dir=tools/phpstan
composer update --working-dir=tools/phpstan/includes

Run PHPStan with:

tools/phpstan/vendor/bin/phpstan

Style Checking

This project uses PHP CS Fixer to ensure code style consistency.

Install the required dependencies with:

composer update --working-dir=tools/php-cs-fixer

To fix the code style, run:

tools/php-cs-fixer/vendor/bin/php-cs-fixer fix

Bundled PHP CS Fixer

The PHP-CS-Fixer package is bundled with this project and used by some makers.

To update the Phar file to the latest version, run:

curl -fsSLo src/Resources/bin/php-cs-fixer.phar https://cs.symfony.com/download/php-cs-fixer-v3.phar
chmod a+x src/Resources/bin/php-cs-fixer.phar

Get the version of the downloaded Phar file:

php src/Resources/bin/php-cs-fixer.phar --version

Update the BUNDLED_PHP_CS_FIXER_VERSION constant in src/Util/TemplateLinter.php:

-     public const BUNDLED_PHP_CS_FIXER_VERSION = '3.49.0';
+     public const BUNDLED_PHP_CS_FIXER_VERSION = '3.92.5';