Skip to content

Mark VariableWritesNode and VariableWrite as @api - #6415

Merged
ondrejmirtes merged 1 commit into
2.3.xfrom
variable-writes-api
Sep 11, 2026
Merged

ondrejmirtes merged 1 commit into
2.3.xfrom
variable-writes-api

Conversation

@ondrejmirtes

Copy link
Copy Markdown
Member

Follow-up to #6414. phpstan-strict-rules now listens on VariableWritesNode and calls VariableWrite::getKind() / getVariableName(); without @api its level 8 self-analysis reports phpstanApi.method / phpstanApi.classConstant for every call. The other virtual nodes extensions listen on (ReturnStatementsNode, InClassNode, ...) are already @api.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LYiPGg9cpsKLyK6X5BrJTT

phpstan-strict-rules listens on VariableWritesNode, like the other
virtual nodes it consumes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LYiPGg9cpsKLyK6X5BrJTT
@phpstan-bot

Copy link
Copy Markdown
Collaborator

You've opened the pull request against the latest branch 2.3.x. PHPStan 2.3 is not going to be released for months. If your code is relevant on 2.2.x and you want it to be released sooner, please rebase your pull request and change its target to 2.2.x.

@ondrejmirtes
ondrejmirtes merged commit 6604987 into 2.3.x Sep 11, 2026
227 of 228 checks passed
@ondrejmirtes
ondrejmirtes deleted the variable-writes-api branch September 11, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants