From 6ab340d696ee955295b354b238f73da0bed67337 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Dec 2023 21:56:04 +0000 Subject: [PATCH 1/2] chore(deps-dev): update rector/rector requirement Updates the requirements on [rector/rector](https://github.com/rectorphp/rector) to permit the latest version. - [Release notes](https://github.com/rectorphp/rector/releases) - [Commits](https://github.com/rectorphp/rector/compare/0.18.12...0.18.13) --- updated-dependencies: - dependency-name: rector/rector dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9b0131921c5c..b9799247d5aa 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "phpunit/phpcov": "^8.2", "phpunit/phpunit": "^9.1", "predis/predis": "^1.1 || ^2.0", - "rector/rector": "0.18.12", + "rector/rector": "0.18.13", "vimeo/psalm": "^5.0" }, "replace": { From 3cfbdf2b2e906dbafaa394675b238041558fd5a6 Mon Sep 17 00:00:00 2001 From: kenjis Date: Fri, 22 Dec 2023 10:34:47 +0900 Subject: [PATCH 2/2] chore: add StringClassNameToClassConstantRector option --- rector.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rector.php b/rector.php index 6d69a0fba2fd..5be63b31e59d 100644 --- a/rector.php +++ b/rector.php @@ -145,9 +145,14 @@ $rectorConfig->rule(TernaryEmptyArrayArrayDimFetchToCoalesceRector::class); $rectorConfig->rule(EmptyOnNullableObjectToInstanceOfRector::class); $rectorConfig->rule(DisallowedEmptyRuleFixerRector::class); - $rectorConfig->rule(StringClassNameToClassConstantRector::class); $rectorConfig->rule(PrivatizeFinalClassPropertyRector::class); $rectorConfig->rule(CompleteDynamicPropertiesRector::class); $rectorConfig->rule(BooleanInIfConditionRuleFixerRector::class); $rectorConfig->rule(SingleInArrayToCompareRector::class); + + $rectorConfig + ->ruleWithConfiguration(StringClassNameToClassConstantRector::class, [ + // keep '\\' prefix string on string '\Foo\Bar' + StringClassNameToClassConstantRector::SHOULD_KEEP_PRE_SLASH => true, + ]); };