- Home
- Code Formatting Tools
- PHP CS Fixer
PHP CS Fixer
What it is
PHP CS Fixer is a free tool that detects PHP coding-standard problems and can fix them automatically. Its built-in rule sets cover PHP-FIG’s PER Coding Style, Symfony, and PhpCsFixer standards; teams can also define a style in a configuration file or create custom rules. The `fix` command applies changes, while `check` reports findings without modifying files. Rules that could change program behavior are considered risky and are not run by default. Other rule sets help move code toward newer PHP and PHPUnit versions. PHP CS Fixer supports PHP 7.4–8.5 and runs on Linux in a self-hosted setup. The project recommends installation as a Composer development dependency and also documents Docker, PHIVE, Homebrew, and PHAR options. Caching is enabled by default for supported installation methods, and the tool runs in parallel by default. CI examples cover GitHub Actions and GitLab CI, with GitLab Code Quality output also described. Editor support includes native PhpStorm integration and plugins for NetBeans, Sublime Text, Vim, and VS Code. The project is open source under the MIT license and costs nothing.
For and against
For
- Built-in rules cover PHP-FIG, Symfony, and PhpCsFixer styles.
- Check mode reports without changing files.
- Risky rules are off by default.
- Supports PHP 7.4–8.5.
- MIT-licensed and free.
Against
- Linux and self-hosted are the listed platforms.
- Risky rules are not run by default.
- It supports PHP, not other listed languages.
The verdict
PHP CS Fixer offers configurable PHP style checks and automatic fixes, with a check-only mode for reporting issues without edits. Its installation options, CI examples, and editor support make it suited to developer workflows that can run a self-hosted PHP tool.
Who it suits
PHP developers and teams can use PHP CS Fixer to apply or check coding-style rules in a self-hosted workflow. It also suits projects that want CI examples and editor integrations.
Plans and prices
PHP CS Fixer
PHP 7.4–8.5 supported
Read 4 Oct 2026 · cs.symfony.com
On the record
- Caching and parallelism
- Caching is enabled by default for supported installation methods, and the fixer runs in parallel by default.cs.symfony.com · read 4 Oct 2026
- Custom styles
- You can define a team coding style in a configuration file or create custom rules.cs.symfony.com · read 4 Oct 2026
- Editor support
- The site lists native PhpStorm support and dedicated plugins for NetBeans, Sublime Text, Vim, and VS Code.cs.symfony.com · read 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.cs.symfony.com · read 4 Oct 2026
- Integrations
- The documentation provides CI examples for GitHub Actions and GitLab CI, and describes GitLab Code Quality output.cs.symfony.com · read 4 Oct 2026
- License
- The project is released under the MIT license.cs.symfony.com · read 4 Oct 2026
- Maintainers
- The site credits Fabien Potencier and Dariusz Rumiński with bringing PHP CS Fixer to users.cs.symfony.com · read 4 Oct 2026
- Modernization
- The tool includes rule sets for migrating code toward newer PHP and PHPUnit versions.cs.symfony.com · read 4 Oct 2026
- Purpose
- PHP CS Fixer detects PHP coding standards problems and fixes them automatically.cs.symfony.com · read 4 Oct 2026
- Risky rules
- Rules that could change code behavior are considered risky, and they are not run by default.cs.symfony.com · read 4 Oct 2026
- Rule sets
- Built-in rule sets include PHP-FIG’s PER Coding Style, Symfony, and PhpCsFixer standards.cs.symfony.com · read 4 Oct 2026
- Run modes
- The `fix` command applies changes, while `check` reports results without changing files.cs.symfony.com · read 4 Oct 2026
- Security reporting
- The project asks users to report security vulnerabilities through its GitHub security advisories and not to publish reports publicly.github.com · read 4 Oct 2026
- Support and community
- The maintainers welcome contributions, bug reports, and feature ideas on GitHub, and direct questions to GitHub Discussions.cs.symfony.com · read 4 Oct 2026