# PHP CS Fixer

> Automatically fixes PHP code to follow coding standards

Source: https://talira.ai/catalog/php-cs-fixer-wxxjt9v6
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [developer tools / formatting](https://talira.ai/categories/developer-tools/formatting), [languages / php](https://talira.ai/categories/languages/php)
- Licence: MIT[^2]
- Pricing: Free and open source[^2]
- Pricing notes: Free and open source under the MIT licence.
- Free tier: yes[^2]
- Backed by: [PHP CS Fixer](https://talira.ai/orgs/php-cs-fixer.md)
- Creator: Fabien Potencier and Dariusz Rumiński

PHP CS Fixer (the PHP Coding Standards Fixer) finds coding standard problems in PHP code and fixes them for you, rather than only reporting them as a linter does. It has built-in rule sets for PHP-FIG's PER Coding Style, Symfony's style and its own opinionated @PhpCsFixer set, and a configuration file for a team's own style, with custom rules for anything not built in. Migration sets also modernise code towards newer PHP and PHPUnit versions. It runs from Composer (with a shim package for dependency conflicts), PHIVE, Docker images on GitHub's registry or a GitHub Action, and PhpStorm supports it natively, with plugins for VS Code, Vim, Sublime Text and NetBeans. Fabien Potencier, Symfony's creator, and Dariusz Rumiński made it, and it supports PHP 7.4 to 8.5. [PHP_CodeSniffer](https://talira.ai/catalog/php-codesniffer-zrnhrrbz.md) is the best-known alternative.

## Links

- Website: https://cs.symfony.com/
- GitHub: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer
- Docs: https://cs.symfony.com/

## Ways to install

### Package managers

- [Homebrew](https://talira.ai/catalog/homebrew-djy17yn9.md): <https://formulae.brew.sh/formula/php-cs-fixer>[^1]

## Problems it solves

- make every PHP file in our repository follow the same code style automatically
- fail the CI build when a pull request's PHP code isn't formatted to our standard
- reformat a legacy PHP codebase to PSR-12 or PER coding style without doing it by hand
- upgrade old PHP code to use newer language features across the whole project
- format PHP on save in my editor

## Features

- fixes coding standard issues, not only reports them
- check mode for CI that reports what would change
- built-in rule sets: @PER-CS, @Symfony and @PhpCsFixer
- configuration file for a project's own style
- custom rules
- migration sets to modernise code for newer PHP and PHPUnit versions
- supports PHP 7.4 to 8.5
- install with Composer, a shim package, PHIVE or Docker
- official Docker images and a GitHub Action
- native PhpStorm support and plugins for VS Code, Vim, Sublime Text and NetBeans

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.77 out of 1.
Signals: maintenance 1.00, adoption 0.83, momentum 0.57, community 1.00, backing 0.50, extensibility 0.20.

- last commit 2 days ago
- 85 commits in the last 90 days
- latest release v3.95.32 12 days ago
- 13.6k GitHub stars
- 446 contributors
- accepts sponsorship (Github)
- 901 Homebrew installs in 30 days
- has a company behind it
- created by Fabien Potencier and Dariusz Rumiński

## Alternatives

- [PHP_CodeSniffer](https://talira.ai/catalog/php-codesniffer-zrnhrrbz.md): Detect and fix coding standard violations in PHP
- [Easy Coding Standard (ECS)](https://talira.ai/catalog/easy-coding-standard-ecs-1f178a34.md): Runs PHP_CodeSniffer and PHP-CS-Fixer rules together, fast
- [rustfmt](https://talira.ai/catalog/rustfmt-r30f7ns1.md): A tool for formatting Rust code according to style guidelines
- [Prettier](https://talira.ai/catalog/prettier-wqw3mymz.md): An opinionated code formatter that reprints your code in one consistent style
- [dart_style](https://talira.ai/catalog/dart-style-w5rmrtnc.md): An opinionated, automatic Dart source code formatter

## Sources

[^1]: https://formulae.brew.sh/formula/php-cs-fixer (checked 24 Nov 2026)
[^2]: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/LICENSE (checked 24 Nov 2026)
