A tool that automatically fixes PHP code to follow coding standards and modernizes codebases.
PHP CS Fixer is a tool that automatically detects and fixes PHP coding standards issues in your code. It saves developers from tedious manual fixes, especially in large projects, by enforcing consistent styles and modernizing code towards newer PHP and PHPUnit versions.
PHP developers and teams working on projects that require consistent coding standards, such as those following PER-CS, Symfony, or custom style guides. It is particularly useful for large codebases where manual style fixes are impractical.
Developers choose PHP CS Fixer because it not only identifies coding standards violations but also automatically fixes them, reducing manual effort. It offers flexibility with built-in rule sets for popular standards, custom configuration for team-specific styles, and features for code modernization to newer PHP and PHPUnit versions.
A tool to automatically fix PHP Coding Standards issues
Includes standards like PER-CS, Symfony, and the opinionated PhpCsFixer set, reducing configuration time and ensuring consistency.
Offers auto-migration rule sets for upgrading to newer PHP and PHPUnit versions, automating tedious refactoring tasks.
Allows creation of custom rules for team-specific styles, as documented, providing flexibility beyond built-in options.
Provides `@auto` and `@auto:risky` sets for a good starting point, simplifying initial setup without extensive tuning.
Support for the latest PHP versions can lag, requiring the `--allow-unsupported-php-version` flag for risky use, as noted in the documentation.
Only PhpStorm has native support; other editors rely on community plugins which may be less maintained or reliable.
Risky rules, like those in auto-migration sets, can introduce breaking changes if not tested thoroughly, as warned in the rule sets docs.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.