From fdf42ebb68ec5ce427cc6cbf1c825a883f1bde27 Mon Sep 17 00:00:00 2001 From: Dmitrii Bukhonov Date: Tue, 10 Mar 2026 20:56:22 +0400 Subject: [PATCH 1/3] Update type hints and upgrade PHP CS Fixer rules --- .php-cs-fixer.php | 2 +- config/common/di/error-handler.php | 2 +- src/Environment.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index e575eeea..1a33365a 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -23,7 +23,7 @@ ->setCacheFile(__DIR__ . '/runtime/cache/.php-cs-fixer.cache') ->setParallelConfig(ParallelConfigFactory::detect()) ->setRules([ - '@PER-CS2.0' => true, + '@PER-CS3.0' => true, 'no_unused_imports' => true, ]) ->setFinder($finder); diff --git a/config/common/di/error-handler.php b/config/common/di/error-handler.php index 9155ff78..67a1f538 100644 --- a/config/common/di/error-handler.php +++ b/config/common/di/error-handler.php @@ -12,7 +12,7 @@ return [ HtmlRenderer::class => [ '__construct()' => [ - 'traceLink' => static function (string $file, int|null $line) use ($params): string|null { + 'traceLink' => static function (string $file, ?int $line) use ($params): string|null { if (!isset($params['traceLink'])) { return null; } diff --git a/src/Environment.php b/src/Environment.php index fd834d58..62359b7f 100644 --- a/src/Environment.php +++ b/src/Environment.php @@ -58,7 +58,7 @@ public static function isProd(): bool /** * @return non-empty-string|null */ - public static function appHostPath(): string|null + public static function appHostPath(): ?string { /** @var non-empty-string|null */ return self::$values['APP_HOST_PATH']; @@ -114,7 +114,7 @@ private static function setString(string $key, string $default): void self::$values[$key] = $value ?? $default; } - private static function setNonEmptyStringOrNull(string $key, string|null $default): void + private static function setNonEmptyStringOrNull(string $key, ?string $default): void { $value = self::getRawValue($key); self::$values[$key] = $value === null || $value === '' ? $default : $value; From e21a313cd6b428934ecb70b3e70aa6d0193abe7d Mon Sep 17 00:00:00 2001 From: Dmitrii Bukhonov Date: Tue, 10 Mar 2026 23:01:53 +0400 Subject: [PATCH 2/3] Replace deprecated PHP CS Fixer rule set `@PER-CS3.0` with `@PER-CS` --- .php-cs-fixer.php | 2 +- CHANGELOG.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 1a33365a..9433c283 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -23,7 +23,7 @@ ->setCacheFile(__DIR__ . '/runtime/cache/.php-cs-fixer.cache') ->setParallelConfig(ParallelConfigFactory::detect()) ->setRules([ - '@PER-CS3.0' => true, + '@PER-CS' => true, 'no_unused_imports' => true, ]) ->setFinder($finder); diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dff3b3d..d6b24db6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## 1.2.1 under development +- Chg #430: Replace deprecated PHP CS Fixer rule set `@PER-CS3.0` with `@PER-CS` (@dbuhonov) - Chg #447, #450: Allow symfony/console 8 (@samdark) - Enh #448: Add grouping to `make` help output (@Xakki, @samdark) - Enh #449: Update composer dependencies and refactor to replace use of deprecated classes (@vjik) From ff20e9e40d05a727197924aa75a46605c3a979b9 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Tue, 10 Mar 2026 22:06:15 +0300 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6b24db6..ee91ddd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## 1.2.1 under development -- Chg #430: Replace deprecated PHP CS Fixer rule set `@PER-CS3.0` with `@PER-CS` (@dbuhonov) +- Chg #430: Replace deprecated PHP CS Fixer rule set `@PER-CS2.0` with `@PER-CS` (@dbuhonov) - Chg #447, #450: Allow symfony/console 8 (@samdark) - Enh #448: Add grouping to `make` help output (@Xakki, @samdark) - Enh #449: Update composer dependencies and refactor to replace use of deprecated classes (@vjik)