PHP CS Fixer
PHP CS Fixer is a free Linux and self-hosted tool that detects PHP coding-standard problems and fixes them automatically.
What PHP CS Fixer is
PHP CS Fixer is a free Linux and self-hosted tool that detects PHP coding-standard problems and fixes them automatically. Built-in rule sets cover PHP-FIG’s PER Coding Style, Symfony, and PhpCsFixer standards. Teams can define a style in configuration or create custom rules, and additional sets help migrate code toward newer PHP and PHPUnit versions. The `fix` command changes files, while `check` reports findings without editing them. Rules that might alter behavior are classified as risky and are disabled by default. Installation options include Composer as a development dependency, Docker, PHIVE, Homebrew, and PHAR. Caching is enabled by default for supported installation methods, and execution runs in parallel by default. Documentation includes GitHub Actions and GitLab CI examples, plus GitLab Code Quality output. Editor support covers PhpStorm and plugins for NetBeans, Sublime Text, Vim, and VS Code. PHP CS Fixer supports PHP 7.4–8.5, offers a library API, changed-lines formatting, and ignore files, and is released under the MIT license at no cost.
Good
- Includes PER, Symfony, and PhpCsFixer rule sets
- Supports custom team styles and rules
- Check mode leaves files unchanged
- Integrates with GitHub Actions and GitLab CI
- Runs with caching and parallel execution
Watch out
- Linux and self-hosted platform support
- Risky rules are off by default
- Supports PHP 7.4–8.5 only
Who it suits
It suits PHP teams standardizing formatting locally or in CI, especially those using Composer and supported editors. It also fits projects migrating toward newer PHP or PHPUnit versions.
Verdict
PHP CS Fixer provides configurable PHP formatting and modernization rules with command-line, CI, and editor options. Its free MIT-licensed model makes it practical for teams that can use its Linux or self-hosted setup.
Plans and prices
From PHP CS Fixer's own pricing page, checked 4 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| PHP CS Fixer | Free | PHP 7.4–8.5 supported |
The facts
Each one read from PHP CS Fixer's own pages, with the date it was checked.
What it does
- Caching and parallelism
- Caching is enabled by default for supported installation methods, and the fixer runs in parallel by default.checked 4 Oct 2026
- Custom styles
- You can define a team coding style in a configuration file or create custom rules.checked 4 Oct 2026
- Editor support
- The site lists native PhpStorm support and dedicated plugins for NetBeans, Sublime Text, Vim, and VS Code.checked 4 Oct 2026
- Installation
- The project recommends installing PHP CS Fixer as a Composer development dependency, and also documents Docker, PHIVE, Homebrew, and PHAR installation.checked 4 Oct 2026
- Integrations
- The documentation provides CI examples for GitHub Actions and GitLab CI, and describes GitLab Code Quality output.checked 4 Oct 2026
- License
- The project is released under the MIT license.checked 4 Oct 2026
- Maintainers
- The site credits Fabien Potencier and Dariusz Rumiński with bringing PHP CS Fixer to users.checked 4 Oct 2026
- Modernization
- The tool includes rule sets for migrating code toward newer PHP and PHPUnit versions.checked 4 Oct 2026
- Purpose
- PHP CS Fixer detects PHP coding standards problems and fixes them automatically.checked 4 Oct 2026
- Risky rules
- Rules that could change code behavior are considered risky, and they are not run by default.checked 4 Oct 2026
- Rule sets
- Built-in rule sets include PHP-FIG’s PER Coding Style, Symfony, and PhpCsFixer standards.checked 4 Oct 2026
- Run modes
- The `fix` command applies changes, while `check` reports results without changing files.checked 4 Oct 2026
- Security reporting
- The project asks users to report security vulnerabilities through its GitHub security advisories and not to publish reports publicly.checked 4 Oct 2026
- Support and community
- The maintainers welcome contributions, bug reports, and feature ideas on GitHub, and direct questions to GitHub Discussions.checked 4 Oct 2026
Alternatives to PHP CS Fixer
- 1

Prettier
Free planOpen sourceWebAPIExtensionLinux7.5Free plan - 2
Avidemux
Free planOpen sourceWebLinuxmacOSWindows7.3Free plan - 3
Fourmolu
Free planWebLinuxWindows6.7Free plan - 4
rustfmt
Free planLinuxmacOSWindows6.6Free plan - 5
Black
Free planLinuxmacOSSelf-hostedWindows6.5Free plan - 6

Ruff
Free planWebLinuxmacOSSelf-hosted6.5Free plan
