{"id":15026526,"url":"https://github.com/php-cs-fixer/php-cs-fixer","last_synced_at":"2026-01-04T02:20:32.782Z","repository":{"id":3302511,"uuid":"4344257","full_name":"PHP-CS-Fixer/PHP-CS-Fixer","owner":"PHP-CS-Fixer","description":"A tool to automatically fix PHP Coding Standards issues","archived":false,"fork":false,"pushed_at":"2025-09-04T14:05:28.000Z","size":38100,"stargazers_count":13314,"open_issues_count":91,"forks_count":1618,"subscribers_count":204,"default_branch":"master","last_synced_at":"2025-09-04T23:15:11.183Z","etag":null,"topics":["code-standards","code-style","php","static-analysis"],"latest_commit_sha":null,"homepage":"https://cs.symfony.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PHP-CS-Fixer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"keradus"}},"created_at":"2012-05-16T06:42:23.000Z","updated_at":"2025-09-04T16:16:52.000Z","dependencies_parsed_at":"2023-01-14T11:10:42.937Z","dependency_job_id":"36d94279-b96a-48b2-a01c-72957381e607","html_url":"https://github.com/PHP-CS-Fixer/PHP-CS-Fixer","commit_stats":{"total_commits":5112,"total_committers":396,"mean_commits":"12.909090909090908","dds":0.627151799687011,"last_synced_commit":"f8e9a647c43831406d1846287ad9397d745edca9"},"previous_names":["friendsofphp/php-cs-fixer"],"tags_count":341,"template":false,"template_full_name":null,"purl":"pkg:github/PHP-CS-Fixer/PHP-CS-Fixer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHP-CS-Fixer%2FPHP-CS-Fixer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHP-CS-Fixer%2FPHP-CS-Fixer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHP-CS-Fixer%2FPHP-CS-Fixer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHP-CS-Fixer%2FPHP-CS-Fixer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PHP-CS-Fixer","download_url":"https://codeload.github.com/PHP-CS-Fixer/PHP-CS-Fixer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHP-CS-Fixer%2FPHP-CS-Fixer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274358699,"owners_count":25270680,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-standards","code-style","php","static-analysis"],"created_at":"2024-09-24T20:04:37.650Z","updated_at":"2026-01-04T02:20:32.776Z","avatar_url":"https://github.com/PHP-CS-Fixer.png","language":"PHP","readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://cs.symfony.com\"\u003e\n        \u003cimg src=\"./logo.png\" title=\"PHP CS Fixer\" alt=\"PHP CS Fixer logo\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n# PHP Coding Standards Fixer\n\nThe PHP Coding Standards Fixer (PHP CS Fixer) fixes your code to follow the standards.\n\nIf you are already using a linter to identify coding standards problems in your\ncode, you know that fixing them by hand is tedious, especially on large\nprojects. This tool not only detects them, but also fixes them for you.\n\nPHP CS Fixer has built-in rule sets, whether you want to follow PHP coding standards as defined by [PHP-FIG's PER Coding Style](https://www.php-fig.org/per/coding-style/) - [`@PER-CS`](./doc/ruleSets/PER-CS.rst),\na wide community like the [Symfony](https://symfony.com/doc/current/contributing/code/standards.html) - [`@Symfony`](./doc/ruleSets/Symfony.rst),\nor our opinionated one - [@PhpCsFixer](./doc/ruleSets/PhpCsFixer.rst).\nYou can also define your (team's) style through the [configuration file](./doc/config.rst).\n\nPHP CS Fixer can not only unify the style of your code, but also help to modernise your codebase towards\nnewer PHP (e.g. [`@autoPHPMigration`](./doc/ruleSets/AutoPHPMigration.rst) and [`@autoPHPMigration:risky`](./doc/ruleSets/AutoPHPMigrationRisky.rst)) and newer PHPUnit (e.g. [`@autoPHPUnitMigration:risky`](./doc/ruleSets/AutoPHPUnitMigrationRisky.rst)).\n\nThere are also [`@auto`](./doc/ruleSets/Auto.rst) and [`@auto:risky`](./doc/ruleSets/AutoRisky.rst) that aim to provide good base rules.\n\n## Supported PHP Versions\n\n* PHP 7.4 - PHP 8.5\n\n\u003e [!NOTE]\n\u003e Each new PHP version requires a huge effort to support the new syntax.\n\u003e That's why the latest PHP version might not be supported yet. If you need it,\n\u003e please consider supporting the project in any convenient way, for example,\n\u003e with code contributions or reviewing existing PRs. To run PHP CS Fixer on yet\n\u003e unsupported versions \"at your own risk\" - use `--allow-unsupported-php-version=yes` option.\n\n## Documentation\n\n### Installation\n\nThe recommended way to install PHP CS Fixer is to use [Composer](https://getcomposer.org/download/):\n\n```sh\ncomposer require --dev friendsofphp/php-cs-fixer\n## or when facing conflicts in dependencies:\ncomposer require --dev php-cs-fixer/shim\n```\n\nFor more details and other installation methods (also with Docker or behind CI), see\n[installation instructions](./doc/installation.rst).\n\n### Usage\n\nAssuming you installed PHP CS Fixer as instructed above, you can\ninitialise base config for your project by using following command:\n\n```sh\n./vendor/bin/php-cs-fixer init\n```\n\nTo automatically fix your project, or only check against the need of changes, run:\n\n```sh\n./vendor/bin/php-cs-fixer fix\n./vendor/bin/php-cs-fixer check\n```\n\nSee [usage](./doc/usage.rst), list of [built-in rules](./doc/rules/index.rst), list of [rule sets](./doc/ruleSets/index.rst)\nand [configuration file](./doc/config.rst) documentation for more details.\n\nIf you need to apply code styles that are not built-in into the tool, you can\n[create custom rules](./doc/custom_rules.rst).\n\n## Editor Integration\n\nNative support exists for:\n\n* [PhpStorm](https://www.jetbrains.com/help/phpstorm/using-php-cs-fixer.html)\n\nCommunity plugins exist for:\n\n* [NetBeans](https://plugins.netbeans.apache.org/catalogue/?id=36)\n* [Sublime Text](https://github.com/benmatselby/sublime-phpcs)\n* [Vim](https://github.com/stephpy/vim-php-cs-fixer)\n* [VS Code](https://github.com/junstyle/vscode-php-cs-fixer)\n\n## Community\n\nThe PHP CS Fixer is maintained on GitHub at \u003chttps://github.com/PHP-CS-Fixer/PHP-CS-Fixer\u003e.\nContributions, bug reports and ideas about new features are welcome there.\n\nYou can reach us in the [GitHub Discussions](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/discussions/) regarding the\nproject, configuration, possible improvements, ideas and questions.\n\n## Contribute\n\nThe tool comes with quite a few built-in fixers, but everyone is more than\nwelcome to [contribute](./CONTRIBUTING.md) more of them.\n","funding_links":["https://github.com/sponsors/keradus"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-cs-fixer%2Fphp-cs-fixer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-cs-fixer%2Fphp-cs-fixer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-cs-fixer%2Fphp-cs-fixer/lists"}