{"id":14966659,"url":"https://github.com/plumthedev/yii2-php-cs-fixer-config","last_synced_at":"2025-10-25T17:30:34.333Z","repository":{"id":57042951,"uuid":"219511988","full_name":"plumthedev/yii2-php-cs-fixer-config","owner":"plumthedev","description":"PHP CS Fixer Config for Yii2 projects","archived":false,"fork":false,"pushed_at":"2024-03-04T21:03:38.000Z","size":39,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T09:22:57.455Z","etag":null,"topics":["php","php-cs","php-cs-fixer","php-cs-fixer-config","php-cs-fixer-custom-fixers","php-cs-fixer-ruleset","php-framework","php-library","php5","php7","php71","php72","phpunit","yii2","yii2-advanced","yii2-basic","yii2-framework","yii2-modules"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/plumthedev/yii2-php-cs-fixer-config","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/plumthedev.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-04T13:47:59.000Z","updated_at":"2024-11-01T00:47:53.000Z","dependencies_parsed_at":"2024-09-07T06:31:14.054Z","dependency_job_id":null,"html_url":"https://github.com/plumthedev/yii2-php-cs-fixer-config","commit_stats":{"total_commits":21,"total_committers":2,"mean_commits":10.5,"dds":0.04761904761904767,"last_synced_commit":"5373adbcf6892047baa72519a7a4a5f9f3205eb2"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plumthedev%2Fyii2-php-cs-fixer-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plumthedev%2Fyii2-php-cs-fixer-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plumthedev%2Fyii2-php-cs-fixer-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plumthedev%2Fyii2-php-cs-fixer-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plumthedev","download_url":"https://codeload.github.com/plumthedev/yii2-php-cs-fixer-config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238183610,"owners_count":19430155,"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","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":["php","php-cs","php-cs-fixer","php-cs-fixer-config","php-cs-fixer-custom-fixers","php-cs-fixer-ruleset","php-framework","php-library","php5","php7","php71","php72","phpunit","yii2","yii2-advanced","yii2-basic","yii2-framework","yii2-modules"],"created_at":"2024-09-24T13:36:46.021Z","updated_at":"2025-10-25T17:30:29.038Z","avatar_url":"https://github.com/plumthedev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dear Packagist maintainer, looks it is me plumthedev and I really really need your help! Could you change my email to kacper.pruszynski99@gmail.com? Thanks in advance!\n\n# Yii2 PHP CS Fixer Config\n![Packagist downloads](https://img.shields.io/packagist/dt/plumthedev/yii2-php-cs-fixer-config?color=%238e44ad)\n![GitHub license](https://img.shields.io/github/license/plumthedev/yii2-php-cs-fixer-config?color=%238e44ad)\n![GitHub stars](https://img.shields.io/github/stars/plumthedev/yii2-php-cs-fixer-config?color=%238e44ad)\n\nPHP CS Fixer config for Yii2 projects. Contains [Config](src/Config.php) and [Finder](src/Finder.php) which excludes by default Yii2 app basic and advanced directories.   \nThe ruleset is [grab from Yii 2 ecosystem](https://github.com/yiisoft/yii2/blob/master/cs/src/YiiConfig.php) and is automatically updated with it. \n\n## Installation\n```shell script\n$ composer require --dev plumthedev/yii2-php-cs-fixer-config\n```\n\n## Usage\nCreate a configuration file `.php_cs` in the root of your project:\n\n```php\n\u003c?php\n$composerJsonPath = __DIR__ . '/composer.json';\n$composerJson = file_get_contents($composerJsonPath);\n$composerProject = json_decode($composerJson);\n$currentYear = date('Y');\n\n$projectHeader = \u003c\u003c\u003cHEADER\nYii2 PHP CS Fixer Config\n\n@author Kacper Pruszynski (plumthedev)\n@link https://github.com/plumthedev/yii2-php-cs-fixer-config\n@copyright Copyright (c) 2019 - {$currentYear} plumthedev\n@license https://github.com/plumthedev/yii2-php-cs-fixer-config/blob/master/LICENSE\n@version {$composerProject-\u003eversion}\nHEADER;\n\nuse plumthedev\\PhpCsFixer\\Config;\n\n$csConfig = Config::create();\n\n// CS Config setup\n$csConfig-\u003emergeRules([\n    'header_comment' =\u003e [\n        'header' =\u003e $projectHeader,\n        'commentType' =\u003e 'PHPDoc',\n        'separate' =\u003e 'bottom',\n    ]\n]);\n\n// CS Finder setup\n$csConfigFinder = $csConfig-\u003egetFinder();\n$csConfigFinder-\u003ein(__DIR__); // set current project directory\n$csConfig-\u003esetFinder($csConfigFinder);\n\nreturn $csConfig;\n\n```\n\n## Running the tests\n\nPHPUnit\n\n```shell script\n$ composer unit-tests\n```\n\nPHP CS Fixer\n\n```shell script\n$ composer cs-fix\n```\n\n## Contributing\n\nThis library is open source so if you want to contribute, you can.\n\u003e\nPlease submit bug reports, suggestions and pull requests to the [GitHub issue tracker](https://github.com/plumthedev/yii2-php-cs-fixer-config/issues).\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplumthedev%2Fyii2-php-cs-fixer-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplumthedev%2Fyii2-php-cs-fixer-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplumthedev%2Fyii2-php-cs-fixer-config/lists"}