From 2f5015d65421e2fb61ee7b0ec3dec2133eff4676 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 18 Feb 2024 00:33:46 +0000 Subject: [PATCH] Updated Rector to commit a4f28525c9df28ed142eabe1cde70035715fa785 https://github.com/rectorphp/rector-src/commit/a4f28525c9df28ed142eabe1cde70035715fa785 [Transform] Allow transform bootstrapFiles() to withBootstrapFiles() on RectorConfigBuilderRector (#5633) --- .../FileWithoutNamespace/RectorConfigBuilderRector.php | 8 ++++++++ src/Application/VersionResolver.php | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/rules/Transform/Rector/FileWithoutNamespace/RectorConfigBuilderRector.php b/rules/Transform/Rector/FileWithoutNamespace/RectorConfigBuilderRector.php index 8b47f0698d8..0eb96cfc83d 100644 --- a/rules/Transform/Rector/FileWithoutNamespace/RectorConfigBuilderRector.php +++ b/rules/Transform/Rector/FileWithoutNamespace/RectorConfigBuilderRector.php @@ -75,6 +75,7 @@ CODE_SAMPLE $paths = new Array_(); $skips = new Array_(); $autoloadPaths = new Array_(); + $bootstrapFiles = new Array_(); foreach ($stmts as $rectorConfigStmt) { // complex stmts should be skipped, eg: with if else if (!$rectorConfigStmt instanceof Expression) { @@ -111,6 +112,9 @@ CODE_SAMPLE } elseif ($name === 'autoloadPaths') { Assert::isAOf($value, Array_::class); $autoloadPaths = $value; + } elseif ($name === 'bootstrapFiles') { + Assert::isAOf($value, Array_::class); + $bootstrapFiles = $value; } else { // implementing method by method return null; @@ -132,6 +136,10 @@ CODE_SAMPLE $newExpr = $this->nodeFactory->createMethodCall($newExpr, 'withAutoloadPaths', [$autoloadPaths]); $hasChanged = \true; } + if ($bootstrapFiles->items !== []) { + $newExpr = $this->nodeFactory->createMethodCall($newExpr, 'withBootstrapFiles', [$bootstrapFiles]); + $hasChanged = \true; + } if ($hasChanged) { $stmt->expr = $newExpr; } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index d761521ca45..7556b592f2a 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '85aba8e39f1fdf533680074accd34ab2c1ad8fc4'; + public const PACKAGE_VERSION = 'a4f28525c9df28ed142eabe1cde70035715fa785'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-02-18 00:26:16'; + public const RELEASE_DATE = '2024-02-18 07:31:15'; /** * @var int */