From 2df06ab5243da3412fdbb7ebfe7dfde2ec8ab2e8 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 23 Jan 2026 15:46:19 +0300 Subject: [PATCH 01/17] credits --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index bf2078c..c7c3e9d 100644 --- a/README.md +++ b/README.md @@ -86,3 +86,7 @@ Maintained by [Yii Software](https://www.yiiframework.com/). [![Telegram](https://img.shields.io/badge/telegram-join-1DA1F2?style=flat&logo=telegram)](https://t.me/yii3en) [![Facebook](https://img.shields.io/badge/facebook-join-1DA1F2?style=flat&logo=facebook&logoColor=ffffff)](https://www.facebook.com/groups/yiitalk) [![Slack](https://img.shields.io/badge/slack-join-1DA1F2?style=flat&logo=slack)](https://yiiframework.com/go/slack) + +## Credits + +The package is inspired by [spiral/code-style](https://github.com/spiral/code-style) repository. From f6781f77e05dccdcc221f72ed5eaedbfbc7620d0 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 23 Jan 2026 15:47:10 +0300 Subject: [PATCH 02/17] Remove `CODE_OF_CONDUCT` and `PULL_REQUEST_TEMPLATE` --- .github/CODE_OF_CONDUCT.md | 102 ------------------------------- .github/PULL_REQUEST_TEMPLATE.md | 20 ------ 2 files changed, 122 deletions(-) delete mode 100644 .github/CODE_OF_CONDUCT.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md deleted file mode 100644 index 0726080..0000000 --- a/.github/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,102 +0,0 @@ -# Yii Contributor Code of Conduct - -## Our Pledge - -As contributors and maintainers of this project, and in order to keep Yii community open and welcoming, we ask to -respect all community members. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our community include: - -- Demonstrating empathy and kindness toward other people -- Being respectful of differing opinions, viewpoints, and experiences -- Giving and gracefully accepting constructive feedback -- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -- Focusing on what is best not just for us as individuals, but for the overall community - -Examples of unacceptable behavior by participants include: - -- The use of sexualized language or imagery, and sexual attention or advances of any kind -- Trolling, insulting or derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or email address, without their explicit permission -- Other conduct which could reasonably be considered inappropriate in a professional setting - -## Enforcement Responsibilities - -Core team members are responsible for clarifying and enforcing our standards of acceptable behavior and will take -appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Core team members have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, -issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for -moderation decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing -the community in public spaces. Examples of representing a project or community include using an official e-mail -address, posting via an official social media account, within project GitHub, official forum or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting core team members. All -complaints will be reviewed and investigated promptly and fairly. - -All core team members are obligated to respect the privacy and security of the reporter of any incident. - -## Enforcement Guidelines - -Core team members will follow these Community Impact Guidelines in determining the consequences for any action they -deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in -the community. - -**Consequence**: A private, written warning from core team members, providing clarity around the nature of the violation -and an explanation of why the behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of actions. - -**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including -unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding -interactions in community spaces as well as external channels like social media. Violating these terms may lead to -a temporary or permanent ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified -period of time. No public or private interaction with the people involved, including unsolicited interaction with those -enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate -behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at -[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. - -Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC]. - -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at -[https://www.contributor-covenant.org/translations][translations]. - -[homepage]: https://www.contributor-covenant.org -[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4d2bbb0..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,20 +0,0 @@ -## ✔️ Check all applicable options or remove those that do not apply -| Q | A -| ------------- | --- -| Is bugfix? | ✔️/❌ -| New feature? | ✔️/❌ -| Breaks BC? | ✔️/❌ -| Fixed issues | comma-separated list of tickets # fixed by the PR, if any - - -## ✍ Describe your PR in detail - - - - - -## 📷 Screenshots - If you wish, attach an image to help us better understand the idea - - - - From 41c5a9dfb280eb9da0f7f38caf34f0434021ccbe Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 23 Jan 2026 15:47:45 +0300 Subject: [PATCH 03/17] Enable BC checker --- .github/workflows/{bc.yml_ => bc.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{bc.yml_ => bc.yml} (100%) diff --git a/.github/workflows/bc.yml_ b/.github/workflows/bc.yml similarity index 100% rename from .github/workflows/bc.yml_ rename to .github/workflows/bc.yml From e9b262aaba2d4bb3ccb3b40f47a47bef1584f59e Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 23 Jan 2026 15:51:03 +0300 Subject: [PATCH 04/17] Remove mutation testing --- .github/workflows/bc.yml | 2 -- .github/workflows/build.yml | 2 -- .../workflows/composer-require-checker.yml | 2 -- .github/workflows/mutation.yml | 32 ------------------- .github/workflows/static.yml | 2 -- README.md | 1 - composer.json | 2 -- docs/internals.md | 9 ------ infection.json.dist | 16 ---------- 9 files changed, 68 deletions(-) delete mode 100644 .github/workflows/mutation.yml delete mode 100644 infection.json.dist diff --git a/.github/workflows/bc.yml b/.github/workflows/bc.yml index b269391..a9fffcf 100644 --- a/.github/workflows/bc.yml +++ b/.github/workflows/bc.yml @@ -6,7 +6,6 @@ on: - 'CHANGELOG.md' - '.gitignore' - '.gitattributes' - - 'infection.json.dist' - 'phpunit.xml.dist' - 'psalm.xml' push: @@ -17,7 +16,6 @@ on: - 'CHANGELOG.md' - '.gitignore' - '.gitattributes' - - 'infection.json.dist' - 'phpunit.xml.dist' - 'psalm.xml' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 05e7b40..d964d3b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,6 @@ on: - 'CHANGELOG.md' - '.gitignore' - '.gitattributes' - - 'infection.json.dist' - 'psalm.xml' push: @@ -17,7 +16,6 @@ on: - 'CHANGELOG.md' - '.gitignore' - '.gitattributes' - - 'infection.json.dist' - 'psalm.xml' name: build diff --git a/.github/workflows/composer-require-checker.yml b/.github/workflows/composer-require-checker.yml index a857bce..405b25f 100644 --- a/.github/workflows/composer-require-checker.yml +++ b/.github/workflows/composer-require-checker.yml @@ -6,7 +6,6 @@ on: - 'CHANGELOG.md' - '.gitignore' - '.gitattributes' - - 'infection.json.dist' - 'phpunit.xml.dist' - 'psalm.xml' @@ -18,7 +17,6 @@ on: - 'CHANGELOG.md' - '.gitignore' - '.gitattributes' - - 'infection.json.dist' - 'phpunit.xml.dist' - 'psalm.xml' diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml deleted file mode 100644 index 8150499..0000000 --- a/.github/workflows/mutation.yml +++ /dev/null @@ -1,32 +0,0 @@ -on: - pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'psalm.xml' - - push: - branches: ['master'] - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'psalm.xml' - -name: mutation test - -jobs: - mutation: - uses: yiisoft/actions/.github/workflows/roave-infection.yml@master - with: - os: >- - ['ubuntu-latest'] - php: >- - ['8.2'] - secrets: - STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index e33eca8..aa302e2 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -6,7 +6,6 @@ on: - 'CHANGELOG.md' - '.gitignore' - '.gitattributes' - - 'infection.json.dist' - 'phpunit.xml.dist' push: @@ -17,7 +16,6 @@ on: - 'CHANGELOG.md' - '.gitignore' - '.gitattributes' - - 'infection.json.dist' - 'phpunit.xml.dist' name: static analysis diff --git a/README.md b/README.md index c7c3e9d..4ea5b5b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ [![Total Downloads](https://poser.pugx.org/yiisoft/code-style/downloads)](https://packagist.org/packages/yiisoft/code-style) [![Build status](https://github.com/yiisoft/code-style/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/yiisoft/code-style/actions/workflows/build.yml?query=branch%3Amaster) [![Code Coverage](https://codecov.io/gh/yiisoft/code-style/branch/master/graph/badge.svg)](https://codecov.io/gh/yiisoft/code-style) -[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fyiisoft%2Fcode-style%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/yiisoft/code-style/master) [![Static analysis](https://github.com/yiisoft/code-style/actions/workflows/static.yml/badge.svg?branch=master)](https://github.com/yiisoft/code-style/actions/workflows/static.yml?query=branch%3Amaster) [![type-coverage](https://shepherd.dev/github/yiisoft/code-style/coverage.svg)](https://shepherd.dev/github/yiisoft/code-style) [![psalm-level](https://shepherd.dev/github/yiisoft/code-style/level.svg)](https://shepherd.dev/github/yiisoft/code-style) diff --git a/composer.json b/composer.json index bd8b9fc..d7d82c2 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,6 @@ "maglnet/composer-require-checker": "^4.7.1", "phpunit/phpunit": "^10.5.46", "rector/rector": "^2.0.16", - "roave/infection-static-analysis-plugin": "^1.35", "spatie/phpunit-watcher": "^1.24", "vimeo/psalm": "^5.26.1 || ^6.10.3" }, @@ -53,7 +52,6 @@ "config": { "sort-packages": true, "allow-plugins": { - "infection/extension-installer": true, "composer/package-versions-deprecated": true } }, diff --git a/docs/internals.md b/docs/internals.md index 30f70c0..4caa26f 100644 --- a/docs/internals.md +++ b/docs/internals.md @@ -8,15 +8,6 @@ The package is tested with [PHPUnit](https://phpunit.de/). To run tests: ./vendor/bin/phpunit ``` -## Mutation testing - -The package tests are checked with [Infection](https://infection.github.io/) mutation framework with -[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it: - -```shell -./vendor/bin/roave-infection-static-analysis-plugin -``` - ## Static analysis The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis: diff --git a/infection.json.dist b/infection.json.dist deleted file mode 100644 index 3776e22..0000000 --- a/infection.json.dist +++ /dev/null @@ -1,16 +0,0 @@ -{ - "source": { - "directories": [ - "src" - ] - }, - "logs": { - "text": "php:\/\/stderr", - "stryker": { - "report": "master" - } - }, - "mutators": { - "@default": true - } -} From 0674e284cf454b15a42d69bf8fafc0ac0e59ff7b Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 23 Jan 2026 15:52:19 +0300 Subject: [PATCH 05/17] Remove phpunit-watcher --- .phpunit-watcher.yml | 11 ----------- composer.json | 2 -- 2 files changed, 13 deletions(-) delete mode 100644 .phpunit-watcher.yml diff --git a/.phpunit-watcher.yml b/.phpunit-watcher.yml deleted file mode 100644 index 035a80a..0000000 --- a/.phpunit-watcher.yml +++ /dev/null @@ -1,11 +0,0 @@ -watch: - directories: - - src - - tests - fileMask: '*.php' -notifications: - passingTests: false - failingTests: false -phpunit: - binaryPath: vendor/bin/phpunit - timeout: 180 diff --git a/composer.json b/composer.json index d7d82c2..9bf49c4 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,6 @@ "maglnet/composer-require-checker": "^4.7.1", "phpunit/phpunit": "^10.5.46", "rector/rector": "^2.0.16", - "spatie/phpunit-watcher": "^1.24", "vimeo/psalm": "^5.26.1 || ^6.10.3" }, "autoload": { @@ -57,7 +56,6 @@ }, "scripts": { "test": "phpunit --testdox --no-interaction", - "test-watch": "phpunit-watcher watch", "cs-fix": "php-cs-fixer fix" } } From 17edd5a19a6f0e109884078c01adb7544add45be Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 23 Jan 2026 15:53:26 +0300 Subject: [PATCH 06/17] `composer.json` --- composer.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 9bf49c4..e5d96a9 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "yiisoft/code-style", "type": "library", - "description": "Code style tools rulesets collection", + "description": "PHP CS Fixer rule sets for Yii packages", "keywords": [ "yii", "code style" @@ -26,8 +26,6 @@ "url": "https://github.com/sponsors/yiisoft" } ], - "minimum-stability": "dev", - "prefer-stable": true, "require": { "php": "^8.1", "friendsofphp/php-cs-fixer": "^3.92.5" From 2f0f55a8997d3dd50f7f62d15eed382ed78e67da Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 23 Jan 2026 15:56:01 +0300 Subject: [PATCH 07/17] Minor refactor --- src/ConfigBuilder.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/ConfigBuilder.php b/src/ConfigBuilder.php index 7531e43..585262b 100644 --- a/src/ConfigBuilder.php +++ b/src/ConfigBuilder.php @@ -5,19 +5,18 @@ namespace Yiisoft\CodeStyle; use PhpCsFixer\Config; +use PhpCsFixer\ConfigInterface; use Yiisoft\CodeStyle\Sets\YiisoftCoreRiskySet; use Yiisoft\CodeStyle\Sets\YiisoftCoreSet; final class ConfigBuilder { - public static function build(): Config + public static function build(): ConfigInterface { - $config = (new Config()); - $config->registerCustomRuleSets([ - new YiisoftCoreSet(), - new YiisoftCoreRiskySet(), - ]); - - return $config; + return (new Config()) + ->registerCustomRuleSets([ + new YiisoftCoreSet(), + new YiisoftCoreRiskySet(), + ]); } } From 6cea18f207ba6da417eaafa4362d3686c8898ba9 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 23 Jan 2026 15:58:09 +0300 Subject: [PATCH 08/17] Fix `composer test` command --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index e5d96a9..8ecd012 100644 --- a/composer.json +++ b/composer.json @@ -53,7 +53,7 @@ } }, "scripts": { - "test": "phpunit --testdox --no-interaction", + "test": "phpunit --testdox", "cs-fix": "php-cs-fixer fix" } } From 263d72591c9caa81d9247684c08a2e54752be287 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 23 Jan 2026 16:01:53 +0300 Subject: [PATCH 09/17] internals --- docs/internals.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/internals.md b/docs/internals.md index 4caa26f..a51bbd3 100644 --- a/docs/internals.md +++ b/docs/internals.md @@ -18,6 +18,12 @@ The code is statically analyzed with [Psalm](https://psalm.dev/). To run static ## Code style +Package used [PHP CS Fixer](https://cs.symfony.com/) to maintain Yii code style. To check and fix code style: + +```shell +composer cs-fix +``` + Use [Rector](https://github.com/rectorphp/rector) to make codebase follow some specific rules or use either newest or any specific version of PHP: From 5fe8d5790b7bba4a6c385504b15d2c2e99d6eca5 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 23 Jan 2026 16:03:14 +0300 Subject: [PATCH 10/17] psalm 1 --- psalm.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psalm.xml b/psalm.xml index da5a4cb..77a366b 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,6 +1,6 @@ Date: Fri, 23 Jan 2026 16:03:19 +0300 Subject: [PATCH 11/17] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a8fbfe..8ee4e9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# _____ Change Log +# Yii Code Style Change Log ## 1.0.0 under development From 97d9adf8f48b7ddbb0b36a80fc45abec4044c615 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 23 Jan 2026 16:11:03 +0300 Subject: [PATCH 12/17] PHP 7.4+ --- .github/workflows/build.yml | 2 +- .../workflows/composer-require-checker.yml | 2 +- .github/workflows/rector-cs.yml | 2 +- .github/workflows/static.yml | 2 +- .gitignore | 2 +- README.md | 5 ++-- composer.json | 10 +++---- phpunit.xml.dist | 26 +++++++++---------- 8 files changed, 26 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d964d3b..b51c8b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,4 +29,4 @@ jobs: os: >- ['ubuntu-latest', 'windows-latest'] php: >- - ['8.1', '8.2', '8.3'] + ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] diff --git a/.github/workflows/composer-require-checker.yml b/.github/workflows/composer-require-checker.yml index 405b25f..69d2329 100644 --- a/.github/workflows/composer-require-checker.yml +++ b/.github/workflows/composer-require-checker.yml @@ -29,4 +29,4 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.1', '8.2', '8.3'] + ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] diff --git a/.github/workflows/rector-cs.yml b/.github/workflows/rector-cs.yml index 6424c2a..2be4d4e 100644 --- a/.github/workflows/rector-cs.yml +++ b/.github/workflows/rector-cs.yml @@ -24,4 +24,4 @@ jobs: token: ${{ secrets.YIISOFT_GITHUB_TOKEN }} with: repository: ${{ github.event.pull_request.head.repo.full_name }} - php: '8.1' + php: '7.4' diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index aa302e2..0e4411a 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -27,4 +27,4 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.1', '8.2', '8.3'] + ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] diff --git a/.gitignore b/.gitignore index d3b3a3d..6fbafc0 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,7 @@ composer.phar # PhpUnit /phpunit.phar /phpunit.xml -/.phpunit.cache +/.phpunit.result.cache # PHP CS Fixer /.php-cs-fixer.cache diff --git a/README.md b/README.md index 4ea5b5b..a954489 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,12 @@ [![type-coverage](https://shepherd.dev/github/yiisoft/code-style/coverage.svg)](https://shepherd.dev/github/yiisoft/code-style) [![psalm-level](https://shepherd.dev/github/yiisoft/code-style/level.svg)](https://shepherd.dev/github/yiisoft/code-style) -Package for code style control. Contains rule sets for [PHP CS Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer). +A package that provides [PHP CS Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) rule sets for enforcing code style +in Yii packages. ## Requirements -- PHP 8.1 or higher. +- PHP 7.4 or higher. ## Installation diff --git a/composer.json b/composer.json index 8ecd012..0bc274b 100644 --- a/composer.json +++ b/composer.json @@ -27,13 +27,13 @@ } ], "require": { - "php": "^8.1", + "php": "^7.4 || ^8.0", "friendsofphp/php-cs-fixer": "^3.92.5" }, "require-dev": { - "maglnet/composer-require-checker": "^4.7.1", - "phpunit/phpunit": "^10.5.46", - "rector/rector": "^2.0.16", + "maglnet/composer-require-checker": "^3.8.0", + "phpunit/phpunit": "^9.6.31", + "rector/rector": "^2.3.4", "vimeo/psalm": "^5.26.1 || ^6.10.3" }, "autoload": { @@ -53,7 +53,7 @@ } }, "scripts": { - "test": "phpunit --testdox", + "test": "phpunit", "cs-fix": "php-cs-fixer fix" } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 7f0a8fe..8f2359e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,21 +1,21 @@ - + @@ -24,9 +24,9 @@ - + - ./src + src - + From e322e2fee7f2a14c1dd5e4c412cf8d556fda2d16 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 23 Jan 2026 16:12:21 +0300 Subject: [PATCH 13/17] fix --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0bc274b..eccb75b 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "friendsofphp/php-cs-fixer": "^3.92.5" }, "require-dev": { - "maglnet/composer-require-checker": "^3.8.0", + "maglnet/composer-require-checker": "^3.8.0 || ^4.7.1", "phpunit/phpunit": "^9.6.31", "rector/rector": "^2.3.4", "vimeo/psalm": "^5.26.1 || ^6.10.3" From 50ec39bc9a6c8d1b722e18a01ba71f965ba58438 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 23 Jan 2026 16:31:05 +0300 Subject: [PATCH 14/17] Update src/ConfigBuilder.php Co-authored-by: Maksim Spirkov <63721828+mspirkov@users.noreply.github.com> --- src/ConfigBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ConfigBuilder.php b/src/ConfigBuilder.php index 585262b..0aa58c5 100644 --- a/src/ConfigBuilder.php +++ b/src/ConfigBuilder.php @@ -11,7 +11,7 @@ final class ConfigBuilder { - public static function build(): ConfigInterface + public static function build(): Config { return (new Config()) ->registerCustomRuleSets([ From e7ed2b8cc53d767485fbf696c98a2c83694d73e3 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 23 Jan 2026 16:31:13 +0300 Subject: [PATCH 15/17] Update src/ConfigBuilder.php Co-authored-by: Maksim Spirkov <63721828+mspirkov@users.noreply.github.com> --- src/ConfigBuilder.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ConfigBuilder.php b/src/ConfigBuilder.php index 0aa58c5..b16e1d1 100644 --- a/src/ConfigBuilder.php +++ b/src/ConfigBuilder.php @@ -13,10 +13,12 @@ final class ConfigBuilder { public static function build(): Config { - return (new Config()) - ->registerCustomRuleSets([ - new YiisoftCoreSet(), - new YiisoftCoreRiskySet(), - ]); + $config = (new Config()); + $config->registerCustomRuleSets([ + new YiisoftCoreSet(), + new YiisoftCoreRiskySet(), + ]); + + return $config; } } From 6815d72f885ef8dd5f8b89c3ff206cf1c7961646 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 23 Jan 2026 16:31:19 +0300 Subject: [PATCH 16/17] Update src/ConfigBuilder.php Co-authored-by: Maksim Spirkov <63721828+mspirkov@users.noreply.github.com> --- src/ConfigBuilder.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ConfigBuilder.php b/src/ConfigBuilder.php index b16e1d1..7531e43 100644 --- a/src/ConfigBuilder.php +++ b/src/ConfigBuilder.php @@ -5,7 +5,6 @@ namespace Yiisoft\CodeStyle; use PhpCsFixer\Config; -use PhpCsFixer\ConfigInterface; use Yiisoft\CodeStyle\Sets\YiisoftCoreRiskySet; use Yiisoft\CodeStyle\Sets\YiisoftCoreSet; From 13b378e131e1f90139bba1046a92daf9cbe36d91 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 23 Jan 2026 16:31:42 +0300 Subject: [PATCH 17/17] fix --- src/ConfigBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ConfigBuilder.php b/src/ConfigBuilder.php index 7531e43..07a6b9e 100644 --- a/src/ConfigBuilder.php +++ b/src/ConfigBuilder.php @@ -12,7 +12,7 @@ final class ConfigBuilder { public static function build(): Config { - $config = (new Config()); + $config = new Config(); $config->registerCustomRuleSets([ new YiisoftCoreSet(), new YiisoftCoreRiskySet(),