SaigonTech Vault
Loại: knowledge-doc 2026-09-29 active #wiki-import

Window Tutorial

Globally (Composer)

To install PHP CS Fixer, install Composer and issue the following command:

>$ composer global require friendsofphp/php-cs-fixer

Ubuntu Tutorial

Globally (manual)

You can run these commands to easily access latest php-cs-fixer from anywhere on your system:

>$ wget https://cs.symfony.com/download/php-cs-fixer-v2.phar -O php-cs-fixer > or with specified version:

>$ wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.15.8/php-cs-fixer.phar -O php-cs-fixer

or with curl:

>$ curl -L https://cs.symfony.com/download/php-cs-fixer-v2.phar -o php-cs- fixer

then:

>$ sudo chmod a+x php-cs-fixer >$ sudo mv php-cs-fixer /usr/local/bin/php-cs-fixer

Then, just run php-cs-fixer.

Globally (Composer)

To install PHP CS Fixer, install Composer and issue the following command:

>$ composer global require friendsofphp/php-cs-fixer

Then make sure you have the global Composer binaries directory in your PATH. This directory is platform-dependent, see Composer documentation for details. Example for some Unix systems:

>$ export PATH="$PATH:$HOME/.composer/vendor/bin"

Usage

>$ php-cs-fixer fix www/app/Http/Utils/

Loaded config default.<br> Using cache file ".php_cs.cache". 1) www\app\Http\Utils\Results\AnalysisTable.php 2) www\app\Http\Utils\Results\Location.php

Refer

https://github.com/FriendsOfPHP/PHP-CS-Fixer

https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/2.16/doc/installation.rst

https://mlocati.github.io/php-cs-fixer-configurator/#version:2.16

https://www.jetbrains.com/help/idea/using-php-cs-fixer.html?gclid=CjwKCAiA8Jf-BRB-EiwAWDtEGgpDgcJJXsEitZnfzlyj6G219a89p3aWn7oXDJJW-YSxprweZdfhExoCgksQAvD_BwE#enabling-tool-inspection

SaigonTech Co., Ltd