From 52a0ca017680ed51cc4527f326badc126f3fcb48 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Fri, 11 Sep 2026 12:28:59 +0200 Subject: [PATCH] Mark VariableWritesNode and VariableWrite as @api phpstan-strict-rules listens on VariableWritesNode, like the other virtual nodes it consumes. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01LYiPGg9cpsKLyK6X5BrJTT --- src/Node/Variable/VariableWrite.php | 2 ++ src/Node/VariableWritesNode.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Node/Variable/VariableWrite.php b/src/Node/Variable/VariableWrite.php index 2efcb502a1b..7cb13e68c42 100644 --- a/src/Node/Variable/VariableWrite.php +++ b/src/Node/Variable/VariableWrite.php @@ -9,6 +9,8 @@ * * Immutable. Whether the written value was read afterwards is not a property * of the write - it is answered by VariableWritesNode::isRead(). + * + * @api */ final class VariableWrite { diff --git a/src/Node/VariableWritesNode.php b/src/Node/VariableWritesNode.php index ea21dc84dfd..ddf52f4486a 100644 --- a/src/Node/VariableWritesNode.php +++ b/src/Node/VariableWritesNode.php @@ -18,6 +18,8 @@ * Emitted right after the body's ReturnStatementsNode, with the scope inside * the function-like. Arrow functions have no node of their own - their writes * belong to the enclosing function-like. + * + * @api */ final class VariableWritesNode extends NodeAbstract implements VirtualNode {