Skip to content

Commit 664ca0a

Browse files
committed
Updated Rector to commit 9a8110c6fd59565c9d9f140456fcc69b32ad2ec7
rectorphp/rector-src@9a8110c [Php81] Skip as argument unpack on ArrayToFirstClassCallableRector (#8081)
1 parent 364ad3e commit 664ca0a

4 files changed

Lines changed: 12 additions & 2 deletions

File tree

rules/Php81/Rector/Array_/ArrayToFirstClassCallableRector.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ public function refactor(Node $node)
113113
if ($node->getAttribute(AttributeKey::IS_PARAM_DEFAULT)) {
114114
return null;
115115
}
116+
if ($node->getAttribute(AttributeKey::IS_UNPACKED_ARG_VALUE)) {
117+
return null;
118+
}
116119
$args = [new VariadicPlaceholder()];
117120
if ($callerExpr instanceof ClassConstFetch) {
118121
$type = $this->getType($callerExpr->class);

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = 'a181f3feb3bb9fdd5c1913afc1272a47521004e2';
22+
public const PACKAGE_VERSION = '9a8110c6fd59565c9d9f140456fcc69b32ad2ec7';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2026-06-24 14:45:58';
27+
public const RELEASE_DATE = '2026-06-24 16:23:50';
2828
/**
2929
* @var int
3030
*/

src/NodeTypeResolver/Node/AttributeKey.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ final class AttributeKey
176176
* @var string
177177
*/
178178
public const IS_ARG_VALUE = 'is_arg_value';
179+
/**
180+
* @var string
181+
*/
182+
public const IS_UNPACKED_ARG_VALUE = 'is_unpacked_arg_value';
179183
/**
180184
* @var string
181185
*/

src/PhpParser/NodeVisitor/ContextNodeVisitor.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ public function enterNode(Node $node): ?Node
8585
}
8686
if ($node instanceof Arg) {
8787
$node->value->setAttribute(AttributeKey::IS_ARG_VALUE, \true);
88+
if ($node->unpack) {
89+
$node->value->setAttribute(AttributeKey::IS_UNPACKED_ARG_VALUE, \true);
90+
}
8891
return null;
8992
}
9093
if ($node instanceof Param) {

0 commit comments

Comments
 (0)