# PHP-CS-Fixer/PHP-CS-Fixer

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/php-cs-fixer-php-cs-fixer).**

13,463 stars · 1,634 forks · PHP · mit

## Links

- GitHub: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer
- Homepage: https://cs.symfony.com
- awesome-repositories: https://awesome-repositories.com/repository/php-cs-fixer-php-cs-fixer.md

## Topics

`code-standards` `code-style` `php` `static-analysis`

## Description

This tool is a command-line utility designed to automatically detect and correct coding standard violations in PHP source files. It functions as a static analysis and refactoring engine that ensures consistent project-wide formatting by applying predefined community conventions or custom organizational rules.

The project distinguishes itself through a modular rule-based engine that supports both automated style correction and codebase modernization. It allows developers to update legacy syntax to align with newer language versions and testing framework requirements, facilitating the adoption of modern features across existing projects.

The tool provides extensive configuration options for defining file scope, formatting whitespace, and custom rule sets. It supports high-performance workflows through incremental execution caching and parallel task distribution, which significantly reduce processing time on large codebases. Furthermore, it integrates into continuous integration pipelines and development environments to provide automated validation and real-time style enforcement.

Users can manage these processes via a comprehensive command-line interface that includes features for describing rule behavior and exporting machine-readable analysis reports.

## Tags

### Development Tools & Productivity

- [Code Formatting Tools](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/code-formatting-tools.md) — Automatically detects and corrects coding style violations to ensure consistent syntax and structure across the project. ([source](https://cs.symfony.com/))
- [Automated Fixers](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/code-formatting-tools/automated-fixers.md) — Provides a modular engine that automatically identifies and resolves coding standard violations and structural inconsistencies.
- [Coding Style Tools](https://awesome-repositories.com/f/development-tools-productivity/developer-utilities-libraries/developer-tools/code-quality-verification/coding-style-tools.md) — Automatically formats PHP source code to match community conventions or project-specific guidelines. ([source](https://cdn.jsdelivr.net/gh/PHP-CS-Fixer/PHP-CS-Fixer@master/README.md))
- [PHP Formatters](https://awesome-repositories.com/f/development-tools-productivity/developer-utilities-libraries/developer-tools/code-quality-verification/coding-style-tools/php-formatters.md) — Automatically detects and fixes coding standard violations in PHP source files to ensure consistent project-wide formatting.
- [Automated Code Refactoring](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/code-analysis-and-transformation/automated-code-refactoring.md) — Automatically detects and corrects syntax patterns and structural inconsistencies to maintain a clean codebase. ([source](https://cs.symfony.com/doc/ruleSets/PhpCsFixer.html))
- [Automated Migration Codemods](https://awesome-repositories.com/f/development-tools-productivity/project-scaffolding-config-code-generation/migration-tools/automated-migration-codemods.md) — Updates source code syntax to align with newer language versions and modern feature requirements. ([source](https://cs.symfony.com/doc/ruleSets/AutoPHPMigration.html))
- [Incremental Build Caches](https://awesome-repositories.com/f/development-tools-productivity/build-tooling/build-performance-optimization/build-optimizations/incremental-build-caches.md) — Accelerates processing by caching results of previous analysis and formatting tasks to skip unchanged files.
- [Version Migration Utilities](https://awesome-repositories.com/f/development-tools-productivity/development-workflow/version-migration-utilities.md) — Facilitates codebase migration by updating syntax to match specific language version or framework requirements. ([source](https://cs.symfony.com/doc/ruleSets/index.html))
- [Abstract Syntax Tree Transformers](https://awesome-repositories.com/f/development-tools-productivity/build-tooling/build-orchestration-logic/build-system-extensibility/build-system-extensions/abstract-syntax-tree-transformers.md) — Parses source code into structural tree representations to enable precise, automated code modifications and refactoring.
- [Editor Formatting Integrations](https://awesome-repositories.com/f/development-tools-productivity/code-editors-ides/extension-ecosystems-management/editor-extensions/editor-integrations/editor-formatting-integrations.md) — Provides standardized interfaces for triggering automated code formatting directly from within development environments. ([source](https://cs.symfony.com))
- [PHP Development Tools](https://awesome-repositories.com/f/development-tools-productivity/php-development-tools.md) — Integrates code formatting tools directly into text editors for real-time style enforcement and automated cleanup.

### Software Engineering & Architecture

- [Code Analysis & Transformation Engines](https://awesome-repositories.com/f/software-engineering-architecture/code-analysis-transformation-engines.md) — Processes code as a sequential list of language tokens to allow for efficient pattern matching and non-destructive stylistic adjustments.
- [Automated Refactoring Engines](https://awesome-repositories.com/f/software-engineering-architecture/automated-refactoring-engines.md) — Provides an automated engine that updates codebase syntax to align with modern language versions and coding conventions.
- [Coding Standards Enforcement](https://awesome-repositories.com/f/software-engineering-architecture/coding-standards-enforcement.md) — Applies predefined rules to automatically format source code and correct stylistic inconsistencies. ([source](https://cs.symfony.com/doc/ruleSets/PER-CS.html))
- [Coding Standards](https://awesome-repositories.com/f/software-engineering-architecture/development-methodologies/engineering-best-practices/code-craftsmanship-standards/coding-standards.md) — Detects and corrects violations of defined coding styles to ensure project-wide consistency. ([source](https://cs.symfony.com/doc/usage.html))
- [Codebase Standardization](https://awesome-repositories.com/f/software-engineering-architecture/project-management-governance/project-governance/standards-rule-enforcement/codebase-standardization.md) — Enables the definition and enforcement of unique organizational formatting rules across multiple codebases.
- [Team Configuration Standards](https://awesome-repositories.com/f/software-engineering-architecture/project-management-governance/project-governance/standards-rule-enforcement/team-configuration-standards.md) — Allows configuration of project-wide style guidelines to ensure consistent team-wide formatting. ([source](https://cs.symfony.com/doc/config.html))
- [Custom Rule Development](https://awesome-repositories.com/f/software-engineering-architecture/custom-rule-development.md) — Enables the creation of project-specific rules to enforce unique style requirements beyond default sets. ([source](https://cs.symfony.com))
- [Distributed Task Queues](https://awesome-repositories.com/f/software-engineering-architecture/distributed-task-queues.md) — Distributes file analysis and transformation workloads across multiple CPU cores to improve performance on large codebases.
- [Parallel Processing Utilities](https://awesome-repositories.com/f/software-engineering-architecture/parallel-processing-utilities.md) — Distributes analysis and correction tasks across multiple CPU cores to reduce execution time. ([source](https://cs.symfony.com/doc/usage.html))
- [Configuration-Driven Rules](https://awesome-repositories.com/f/software-engineering-architecture/project-management-governance/project-governance/standards-rule-enforcement/configuration-driven-rules.md) — Uses local configuration files to manage and enforce project-wide coding standards and formatting rules.

### Programming Languages & Runtimes

- [Codebase Modernizers](https://awesome-repositories.com/f/programming-languages-runtimes/language-ecosystems-tooling/php-application-frameworks/codebase-modernizers.md) — Updates legacy PHP syntax to leverage modern language features and ensure compatibility with newer runtime versions.

### Testing & Quality Assurance

- [Continuous Integration Quality Controls](https://awesome-repositories.com/f/testing-quality-assurance/code-quality-review/code-quality-tools/continuous-integration-quality-controls.md) — Integrates into continuous integration pipelines to automatically validate and enforce coding standards across team environments.
- [Test Suite Migrators](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/testing-frameworks/test-suite-migrators.md) — Updates test suites to align with newer framework versions by applying automated syntax and structural changes. ([source](https://cs.symfony.com/doc/ruleSets/AutoPHPUnitMigrationRisky.html))
- [Static Code Analysis Tools](https://awesome-repositories.com/f/testing-quality-assurance/code-quality-review/code-quality-tools/static-code-analysis-tools.md) — Inspects PHP source code for stylistic inconsistencies and syntax patterns without requiring manual intervention or execution.

### DevOps & Infrastructure

- [Syntax Transformers](https://awesome-repositories.com/f/devops-infrastructure/cicd-pipeline-automation/core-build-engines/build-tooling/code-transformation-engines/syntax-transformers.md) — Transforms legacy code syntax into modern language versions to improve maintainability and leverage new features. ([source](https://cdn.jsdelivr.net/gh/PHP-CS-Fixer/PHP-CS-Fixer@master/README.md))
- [CI/CD Pipeline Integrations](https://awesome-repositories.com/f/devops-infrastructure/ci-cd-pipeline-integrations.md) — Automates code style verification and formatting checks within continuous integration and deployment workflows. ([source](https://cs.symfony.com/doc/installation.html))

### Data & Databases

- [Analysis Result Caches](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/caching-performance/caching-strategies/query-result-caching/method-result-caches/analysis-result-caches.md) — Caches analysis results to skip unmodified files and accelerate processing times on large codebases. ([source](https://cs.symfony.com/doc/usage.html))

### Operating Systems & Systems Programming

- [Ignore File Parsers](https://awesome-repositories.com/f/operating-systems-systems-programming/system-administration-maintenance/file-system-management/file-system-utilities/ignore-file-parsers.md) — Filters files for processing by automatically ignoring version control paths and non-source assets. ([source](https://cs.symfony.com/doc/config.html))
