From 1769a279b458dac3e09fac68f19c2b3aad79138e Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Thu, 8 Oct 2026 21:20:38 +0200 Subject: [PATCH] [Php81] Skip ArrayToFirstClassCallableRector early on array in attribute --- rules/Php81/Rector/Array_/ArrayToFirstClassCallableRector.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rules/Php81/Rector/Array_/ArrayToFirstClassCallableRector.php b/rules/Php81/Rector/Array_/ArrayToFirstClassCallableRector.php index 88dae554450..75f043919ee 100644 --- a/rules/Php81/Rector/Array_/ArrayToFirstClassCallableRector.php +++ b/rules/Php81/Rector/Array_/ArrayToFirstClassCallableRector.php @@ -98,6 +98,10 @@ public function refactor(Node $node): StaticCall|MethodCall|null return null; } + if ($node->getAttribute(AttributeKey::IS_ARRAY_IN_ATTRIBUTE) === true) { + return null; + } + $scope = ScopeFetcher::fetch($node); $arrayCallable = $this->arrayCallableMethodMatcher->match($node, $scope);