Skip to content

Commit eb0d2fd

Browse files
committed
Merge branch 2.2.x into 2.3.x
2 parents 80e84eb + bd76e52 commit eb0d2fd

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎build/PHPStan/Build/InlineCallCollector.php‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,17 @@ public function processNode(Node $node, Scope $scope): ?array
159159
if ($n instanceof Expr\NullsafePropertyFetch || $n instanceof Expr\NullsafeMethodCall) {
160160
return true;
161161
}
162+
if ($n instanceof Expr\MethodCall) {
163+
// the phar build's PHP 7.4 downgrade resolves a method call's named
164+
// arguments only on a $this->prop receiver (it reads the property's
165+
// native type); after substitution the receiver is the call site's
166+
// expression, and the arguments would survive as a parse error
167+
foreach ($n->getArgs() as $arg) {
168+
if ($arg->name !== null) {
169+
return true;
170+
}
171+
}
172+
}
162173
return false;
163174
});
164175
if ($forbidden !== null) {

0 commit comments

Comments
 (0)