How to Automatically PHP Fix Code Review in TYPO3?

PHP-CS-Fixer is one of the most popular automatic code review tool. For better TYPO3 quality, Do you want to implement PHP Lint Code Review in your TYPO3 projects? Follow these steps.

Step 1. Globally Install & Configure PHP-CS-Fixer

// Globally install PHP-CS-Fixer
composer global require friendsofphp/php-cs-fixer @stable

// Accessible php-cs-fixer command
export PATH="$PATH:$HOME/.composer/vendor/bin"

// Verify the installation
php-cs-fixer --version

Step 2. Code Review Your TYPO3 Extensions

// Automatically Fix PHP Code
php-cs-fixer fix --dry-run --config=.php_cs --diff

// Composer based Fix PHP Code
php /home/nitsan/.composer/vendor/bin/php-cs-fixer fix --dry-run --config=.php_cs --diff

Post a Comment

Captcha Code Can't read the image? Click here to refresh

Got answer to the question you were looking for?