From 8a2ebdf73407456448ddab3e5ce1ba288751710a Mon Sep 17 00:00:00 2001 From: GeorgII Date: Sun, 12 Apr 2026 00:30:30 +0200 Subject: [PATCH] =?UTF-8?q?Add=20DowngradeStandaloneNullTrueFalseReturnTyp?= =?UTF-8?q?eRector=20to=20PHP=E2=80=AF7.4=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Import the rule and register it via `withRules` so that standalone `null`, `true`, and `false` return types are downgraded when applying the PHP 7.4 downgrade set. --- rector/toPhp7.4.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rector/toPhp7.4.php b/rector/toPhp7.4.php index 279b4558..f5c1f4ec 100755 --- a/rector/toPhp7.4.php +++ b/rector/toPhp7.4.php @@ -3,9 +3,13 @@ declare(strict_types=1); use Rector\Config\RectorConfig; +use Rector\DowngradePhp82\Rector\FunctionLike\DowngradeStandaloneNullTrueFalseReturnTypeRector; return RectorConfig::configure() ->withPaths([ __DIR__ . '/../src', ]) + ->withRules([ + DowngradeStandaloneNullTrueFalseReturnTypeRector::class, + ]) ->withDowngradeSets(php74: true);