PHPackages                             stevebauman/php-cs-fixer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. stevebauman/php-cs-fixer

ActiveApplication[PSR &amp; Standards](/categories/psr-standards)

stevebauman/php-cs-fixer
========================

A tool to automatically fix PHP code style

v3.34.0(2y ago)17MITPHPPHP ^7.4 || ^8.0

Since Oct 3Pushed 2y agoCompare

[ Source](https://github.com/stevebauman/PHP-CS-Fixer)[ Packagist](https://packagist.org/packages/stevebauman/php-cs-fixer)[ GitHub Sponsors](https://github.com/keradus)[ RSS](/packages/stevebauman-php-cs-fixer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (28)Versions (2)Used By (0)

 [ ![PHP CS Fixer logo](./logo.png "PHP CS Fixer") ](https://cs.symfony.com)

PHP Coding Standards Fixer
==========================

[](#php-coding-standards-fixer)

The PHP Coding Standards Fixer (PHP CS Fixer) tool fixes your code to follow standards; whether you want to follow PHP coding standards as defined in the PSR-1, PSR-2, etc., or other community driven ones like the Symfony one. You can **also** define your (team's) style through configuration.

It can modernize your code (like converting the `pow` function to the `**` operator on PHP 5.6) and (micro) optimize it.

If you are already using a linter to identify coding standards problems in your code, you know that fixing them by hand is tedious, especially on large projects. This tool does not only detect them, but also fixes them for you.

Supported PHP Versions
----------------------

[](#supported-php-versions)

- PHP 7.4
- PHP 8.0 (except PHP 8.0.0 due to [bug in PHP tokenizer](https://bugs.php.net/bug.php?id=80462))
- PHP 8.1
- PHP 8.2

> **Note**Each new PHP version requires a huge effort to support the new syntax. That's why the latest PHP version might not be supported yet. If you need it, please, consider supporting the project in any convenient way, for example with code contribution or reviewing existing PRs. To run PHP CS Fixer on yet unsupported versions "at your own risk" - leverage the [PHP\_CS\_FIXER\_IGNORE\_ENV](./doc/usage.rst#environment-options).

Documentation
-------------

[](#documentation)

### Installation

[](#installation)

The recommended way to install PHP CS Fixer is to use [Composer](https://getcomposer.org/download/)in a dedicated `composer.json` file in your project, for example in the `tools/php-cs-fixer` directory:

```
mkdir -p tools/php-cs-fixer
composer require --working-dir=tools/php-cs-fixer friendsofphp/php-cs-fixer
```

Or using the main `composer.json`:

```
composer require --dev friendsofphp/php-cs-fixer
```

For more details and other installation methods, see [installation instructions](./doc/installation.rst).

### Usage

[](#usage)

Assuming you installed PHP CS Fixer as instructed above, you can run the following command to fix the files PHP files in the `src` directory:

```
tools/php-cs-fixer/vendor/bin/php-cs-fixer fix src
```

See [usage](./doc/usage.rst), list of [built-in rules](./doc/rules/index.rst), list of [rule sets](./doc/ruleSets/index.rst)and [configuration file](./doc/config.rst) documentation for more details.

If you need to apply code styles that are not supported by the tool, you can [create custom rules](./doc/custom_rules.rst).

Editor Integration
------------------

[](#editor-integration)

Dedicated plugins exist for:

- [NetBeans](https://plugins.netbeans.apache.org/catalogue/?id=36)
- [PhpStorm](https://www.jetbrains.com/help/phpstorm/using-php-cs-fixer.html)
- [Sublime Text](https://github.com/benmatselby/sublime-phpcs)
- [Vim](https://github.com/stephpy/vim-php-cs-fixer)
- [VS Code](https://github.com/junstyle/vscode-php-cs-fixer)

Community
---------

[](#community)

The PHP CS Fixer is maintained on GitHub at . Bug reports and ideas about new features are welcome there.

You can reach us at  about the project, configuration, possible improvements, ideas and questions, please visit us!

Contribute
----------

[](#contribute)

The tool comes with quite a few built-in fixers, but everyone is more than welcome to [contribute](CONTRIBUTING.md) more of them.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

951d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c6dd082636ff8a08df8dfdcd622ea242374d1d76dd33bceec5a6cd3ae26dc24f?d=identicon)[stevebauman](/maintainers/stevebauman)

---

Top Contributors

[![keradus](https://avatars.githubusercontent.com/u/2716794?v=4)](https://github.com/keradus "keradus (5270 commits)")[![SpacePossum](https://avatars.githubusercontent.com/u/10462973?v=4)](https://github.com/SpacePossum "SpacePossum (1609 commits)")[![kubawerlos](https://avatars.githubusercontent.com/u/9282069?v=4)](https://github.com/kubawerlos "kubawerlos (504 commits)")[![fabpot](https://avatars.githubusercontent.com/u/47313?v=4)](https://github.com/fabpot "fabpot (322 commits)")[![julienfalque](https://avatars.githubusercontent.com/u/1736542?v=4)](https://github.com/julienfalque "julienfalque (304 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (106 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (86 commits)")[![gharlan](https://avatars.githubusercontent.com/u/330436?v=4)](https://github.com/gharlan "gharlan (74 commits)")[![Slamdunk](https://avatars.githubusercontent.com/u/152236?v=4)](https://github.com/Slamdunk "Slamdunk (71 commits)")[![Wirone](https://avatars.githubusercontent.com/u/600668?v=4)](https://github.com/Wirone "Wirone (61 commits)")[![ntzm](https://avatars.githubusercontent.com/u/3888578?v=4)](https://github.com/ntzm "ntzm (52 commits)")[![Seldaek](https://avatars.githubusercontent.com/u/183678?v=4)](https://github.com/Seldaek "Seldaek (30 commits)")[![paulbalandan](https://avatars.githubusercontent.com/u/51850998?v=4)](https://github.com/paulbalandan "paulbalandan (29 commits)")[![mvorisek](https://avatars.githubusercontent.com/u/2228672?v=4)](https://github.com/mvorisek "mvorisek (28 commits)")[![clxmstaab](https://avatars.githubusercontent.com/u/47448731?v=4)](https://github.com/clxmstaab "clxmstaab (26 commits)")[![jrmajor](https://avatars.githubusercontent.com/u/26096713?v=4)](https://github.com/jrmajor "jrmajor (21 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (19 commits)")[![dmvdbrugge](https://avatars.githubusercontent.com/u/14186025?v=4)](https://github.com/dmvdbrugge "dmvdbrugge (18 commits)")[![ceeram](https://avatars.githubusercontent.com/u/111448?v=4)](https://github.com/ceeram "ceeram (16 commits)")[![VincentLanglet](https://avatars.githubusercontent.com/u/9052536?v=4)](https://github.com/VincentLanglet "VincentLanglet (13 commits)")

---

Tags

standardsstatic analysisfixerStatic code analysis

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stevebauman-php-cs-fixer/health.svg)

```
[![Health](https://phpackages.com/badges/stevebauman-php-cs-fixer/health.svg)](https://phpackages.com/packages/stevebauman-php-cs-fixer)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k234.7M20.6k](/packages/friendsofphp-php-cs-fixer)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[phan/phan

A static analyzer for PHP

5.6k11.2M1.1k](/packages/phan-phan)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
