You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e89e9c8
Browse filesBrowse the repository at this point in the historyBrowse files
Do not let a node built from another node's attributes inherit its printed key
ExprPrinter caches an expression's printed key in the node's
phpstan_cache_printer attribute. Every node constructed from another
node's attributes - the BooleanAnd/BooleanOr and callable virtual nodes,
the single-subject Isset_ nodes of a multi-variable isset(), the plain
MethodCall read for an argument-less nullsafe call, the __invoke() call of
an invokable callee, the clone-with property fetches, the foreach value
assignment and the $this property fetches ClassStatementsGatherer records -
copied that attribute along, and so printed as the node it was made from
whenever that node had been printed first. A BooleanAndNode then was the
original `$foo && $i++`, and what was tracked for it answered for the
original expression: its keep-void type read mixed instead of bool.
Each of these now drops the cached key from the copied attributes, the way
ArgumentsNormalizer and the nullsafe and pipe handlers already did, in the
PHP classes and in the native mirrors.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSGnoYacTfJv3taAhZkj5o
0 commit comments