From 4bd09959c8b525eaf8460db5a94ddc41252ead40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=BF=D0=B8?= =?UTF-8?q?=D1=80=D0=BA=D0=BE=D0=B2?= Date: Fri, 23 Jan 2026 20:58:01 +0400 Subject: [PATCH 1/3] Replace `friendsofphp/php-cs-fixer` with `yiisoft/code-style` --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0f3fbaa..b5c726d 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "php": "^8.1" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.89.1", + "yiisoft/code-style": "^1.0", "maglnet/composer-require-checker": "^4.7.1", "phpunit/phpunit": "^10.5.46", "rector/rector": "^2.0.16", From fb80392e960ca03095ca986a350eba3bb6ebeadf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=BF=D0=B8?= =?UTF-8?q?=D1=80=D0=BA=D0=BE=D0=B2?= Date: Fri, 23 Jan 2026 23:36:53 +0400 Subject: [PATCH 2/3] CR Fix --- .php-cs-fixer.dist.php | 27 ++++----------------------- composer.json | 1 + 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 92c8559..2477e66 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -2,39 +2,20 @@ declare(strict_types=1); -use PhpCsFixer\Config; use PhpCsFixer\Finder; use PhpCsFixer\Runner\Parallel\ParallelConfigFactory; +use Yiisoft\CodeStyle\ConfigBuilder; $finder = (new Finder())->in([ __DIR__ . '/src', __DIR__ . '/tests', ]); -return (new Config()) +return ConfigBuilder::build() ->setRiskyAllowed(true) ->setParallelConfig(ParallelConfigFactory::detect()) ->setRules([ - '@PER-CS3.0' => true, - 'no_unused_imports' => true, - 'no_extra_blank_lines' => [ - 'tokens' => [ - 'curly_brace_block', - 'extra', - ], - ], - 'ordered_class_elements' => true, - 'class_attributes_separation' => ['elements' => ['method' => 'one']], - 'declare_strict_types' => true, - 'native_function_invocation' => true, - 'native_constant_invocation' => true, - 'fully_qualified_strict_types' => [ - 'import_symbols' => true - ], - 'global_namespace_import' => [ - 'import_classes' => true, - 'import_constants' => true, - 'import_functions' => true, - ], + '@Yiisoft/Core' => true, + '@Yiisoft/Core:risky' => true, ]) ->setFinder($finder); diff --git a/composer.json b/composer.json index b5c726d..b66e8b1 100644 --- a/composer.json +++ b/composer.json @@ -31,6 +31,7 @@ "php": "^8.1" }, "require-dev": { + "friendsofphp/php-cs-fixer": "^3.92.5", "yiisoft/code-style": "^1.0", "maglnet/composer-require-checker": "^4.7.1", "phpunit/phpunit": "^10.5.46", From 3a8e72b68f7e6076bd6b21b3af2dbb823b97dd67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=BF=D0=B8?= =?UTF-8?q?=D1=80=D0=BA=D0=BE=D0=B2?= Date: Fri, 23 Jan 2026 23:39:49 +0400 Subject: [PATCH 3/3] self review --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b66e8b1..1c97ba2 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "php": "^8.1" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.92.5", + "friendsofphp/php-cs-fixer": "^3.93", "yiisoft/code-style": "^1.0", "maglnet/composer-require-checker": "^4.7.1", "phpunit/phpunit": "^10.5.46",