PhpStorm 2026.2 Help

PHP CS Fixer

On this page, enable and configure the PHP CS Fixer quality tool.

Item

Description

Configuration

Select the required interpreter from the list. The list contains all the currently configured local and remote PHP interpreters. For more information, refer to Configure local PHP interpreters and Configure remote PHP interpreters.

Clicking the Browse button to the right of the drop-down list opens PHP CS Fixer Dialog.

Show ignored files

Click to open the PHP CS Fixer Ignored Files dialog, which lists the files that PHP CS Fixer skips. PhpStorm suggests adding a new file to the list during inspection when waiting for response from the PHP CS Fixer exceeds the limit specified in the Tool process timeout field. This is done to prevent slowing down processing. For each file, PhpStorm displays its name and location.

  • To add a file, click the Add button and locate the desired file in the dialog that opens.

  • To delete a file from the list and have PHP CS Fixer process it again, select the file and click the Remove file button the Remove button.

  • To remove all the files from the list, click the Close button.

Allow risky rules for built-in rulesets

Select the checkbox to allow risky rules, that is, the rules that can change code behavior. By default, risky rules are not allowed.

Ruleset

Appoint the ruleset to apply.

  • To use one of the predefined rulesets, select it from the drop-down list. The list contains all the rulesets declared inside the main php-cs-fixer directory structure.

  • To have your code checked against your own previously defined ruleset, choose Custom from the list and provide the path to the .php_cs or .php_cs.dist file with this ruleset. Type the path manually or click the Browse button and select the relevant folder in the dialog that opens.

Run mode

Configure how often PHP CS Fixer is triggered to analyze code:

  • On the fly – PHP CS Fixer runs automatically in the background. Issues are highlighted in the editor as you type.

  • On idle – PHP CS Fixer runs after you stop typing and the inactivity period specified in the Idle threshold (ms) field passes.

  • On save – PHP CS Fixer is triggered only when the file is saved either manually or via PhpStorm's autosave. Issue highlighting is updated only when the file state is persisted to disk.

Idle threshold (ms)

Define the delay time in milliseconds after code modification before PHP CS Fixer runs.

Minimum interval (ms)

Define the minimum time in milliseconds that must pass between two consecutive runs of PHP CS Fixer on the same file. This prevents PHP CS Fixer from running too frequently in case of frequent file savings or heavy typing.

PHP CS Fixer Dialog

The dialog opens when you click the Browse button next to the Configuration list on the PHP CS Fixer page.

Use this dialog to configure the used PHP interpreter, path to the PHP CS Fixer executable file, as well as PHP CS Fixer's behaviour. For more information, refer to PHP CS Fixer.

Item

Description

Interpreters pane

The left-hand pane of the dialog shows the default PHP interpreter to use the PHP CS Fixer from. To add a different interpreter, click the Add button and select an item from the list of CLI interpreters configured in the project.

PHP CS Fixer path

In this field, specify the location of the PHP CS Fixer script: php-cs-fixer.bat for Windows or php-cs-fixer for Linux and macOS.

PhpStorm detects the path to the PHP CS Fixer executable file in the vendor/bin folder and fills in the field automatically, but you can edit it if necessary. Type the path manually or click the Browse button and select the path in the dialog that opens.

To check that the specified path to php-cs-fixer.bat or php-cs-fixer ensures interaction between PhpStorm and PHP CS Fixer, that is, the tool can be launched from PhpStorm and PhpStorm will receive problem reports from it, click the Validate button. This validation is equal to running the php-cs-fixer --version command. If validation passes successfully, PhpStorm displays the information on the detected PHP CS Fixer version.

Tool process timeout

In this field, specify how long you want PhpStorm to wait for a result from PHP CS Fixer. If the timeout is exceeded, the process is terminated to prevent excessive CPU and memory usage. This lets you fine-tune the PHP CS Fixer process behavior depending on the configuration of your computer and the rule sets used.

29 May 2026