FREEDOM251

Freedom251 › Code Formatting Tools

PHP CS Fixer

Free plan LinuxSelf-hosted

Visit PHP CS Fixer Alternatives Pricing

PHP CS Fixer's own site

What PHP CS Fixer is

PHP CS Fixer identifies PHP coding-standard problems and can apply corrections automatically. Its built-in rule sets include PHP-FIG’s PER Coding Style, Symfony, and PhpCsFixer standards; teams can define a style in a configuration file or create custom rules. The `fix` command changes files, while `check` reports findings without editing them. Rules that could change program behavior are treated as risky and are off by default. Other rule sets help move code toward newer PHP and PHPUnit versions. The tool supports PHP 7.4–8.5 and is released under the MIT license. The project recommends installing it as a Composer development dependency, with Docker, PHIVE, Homebrew, and PHAR also documented. Caching is enabled by default for supported installation methods, and parallel execution is on by default. Documentation includes GitHub Actions and GitLab CI examples and GitLab Code Quality output. Editor support includes PhpStorm and plugins for NetBeans, Sublime Text, Vim, and VS Code. PHP CS Fixer costs nothing.

Who it suits

PHP CS Fixer suits PHP developers and teams that want consistent coding styles or help modernizing code. Its configurable rules and CI examples support team workflows.

What it does well

  • Built-in rule sets cover PER, Symfony, and PhpCsFixer styles
  • Custom styles and rules are supported
  • `check` reports without changing files
  • Risky rules are off by default
  • Editor plugins and CI examples are documented

What to know first

  • Supports PHP only
  • No free trial
  • Risky rules are not run by default

Limits

The listed plan costs nothing and supports PHP 7.4–8.5. Risky rules that could change code behavior are not run by default.

Plans

PlanBilled and limitsPrice
PHP CS FixerPHP 7.4–8.5 supportedFree

As cs.symfony.com lists them, read 4 Oct 2026. The maker's own page has the final word.

Getting started

  1. Open the PHP CS Fixer website
  2. Install PHP CS Fixer as a Composer development dependency
  3. Alternatively install it with Docker, PHIVE, Homebrew, or PHAR
  4. Create a configuration file for a team style or custom rules
  5. Run the `check` command to report coding-standard results
  6. Run the `fix` command to apply changes

Verdict

PHP CS Fixer offers automatic formatting alongside a reporting-only mode, with configurable styles and editor and CI options. Its MIT license and free price make it available without a listed purchase cost.

Questions

How much does PHP CS Fixer cost?

The listed PHP CS Fixer plan costs nothing. It is released under the MIT license.

Which language does it support?

PHP CS Fixer supports PHP, specifically PHP versions 7.4 through 8.5.

Where does it run?

It runs on Linux in a self-hosted setup.

Can it avoid changing files?

Yes. The `check` command reports results without changing files, while `fix` applies changes.

Which editors integrate with it?

The site lists native PhpStorm support and dedicated plugins for NetBeans, Sublime Text, Vim, and VS Code.

How can teams customize its style?

Teams can define a coding style in a configuration file or create custom rules.

Facts from PHP CS Fixer's own pages

Caching and parallelism
Caching is enabled by default for supported installation methods, and the fixer runs in parallel by default. · cs.symfony.com, 4 Oct 2026
Custom styles
You can define a team coding style in a configuration file or create custom rules. · cs.symfony.com, 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, 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, 4 Oct 2026
Integrations
The documentation provides CI examples for GitHub Actions and GitLab CI, and describes GitLab Code Quality output. · cs.symfony.com, 4 Oct 2026
License
The project is released under the MIT license. · cs.symfony.com, 4 Oct 2026
Maintainers
The site credits Fabien Potencier and Dariusz Rumiński with bringing PHP CS Fixer to users. · cs.symfony.com, 4 Oct 2026
Modernization
The tool includes rule sets for migrating code toward newer PHP and PHPUnit versions. · cs.symfony.com, 4 Oct 2026
Purpose
PHP CS Fixer detects PHP coding standards problems and fixes them automatically. · cs.symfony.com, 4 Oct 2026
Risky rules
Rules that could change code behavior are considered risky, and they are not run by default. · cs.symfony.com, 4 Oct 2026
Rule sets
Built-in rule sets include PHP-FIG’s PER Coding Style, Symfony, and PhpCsFixer standards. · cs.symfony.com, 4 Oct 2026
Run modes
The `fix` command applies changes, while `check` reports results without changing files. · cs.symfony.com, 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, 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, 4 Oct 2026

Where PHP CS Fixer stands on Freedom251

Look at these too