diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index e575eee..9433c28 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-CS' => true, 'no_unused_imports' => true, ]) ->setFinder($finder); diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dff3b3..ee91ddd 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-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) diff --git a/config/common/di/error-handler.php b/config/common/di/error-handler.php index 9155ff7..67a1f53 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 fd834d5..62359b7 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;