Skip to content

Commit 6d18dba

Browse files
ondrejmirtesclaude
andcommitted
Declare VariableLivenessResolver's properties
The native class declared none of the twin's 25 private properties (the per-resolution state resolve() keeps natively). It declares them through the generated declareProperties() now, so reflection sees the twin's class. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018Fdg8n3eEi4ZoXa4dA2k4A
1 parent 8d530b5 commit 6d18dba

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎turbo-ext/src/VariableLivenessResolver.cpp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,6 +1543,9 @@ void pt_register_variable_liveness_resolver()
15431543
{
15441544
reg::Class cls("PHPStan\\Analyser\\VariableLivenessResolver");
15451545
ptdecl::VariableLivenessResolver::declareClass(cls);
1546+
/* the twin's per-resolution state; resolve() keeps it in C++ and never
1547+
* instantiates the class, but the declaration is the twin's */
1548+
ptdecl::VariableLivenessResolver::declareProperties(cls);
15461549

15471550
cls.method(sigs::resolve, [](INTERNAL_FUNCTION_PARAMETERS) {
15481551
zval *function, *flow;

‎turbo-ext/tests/signature-parity.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
$knownDrift = [
3737
'PhpParser\\NodeTraverser' => 'pending',
3838
'PHPStan\\Analyser\\ExpressionResultStorage' => 'pending',
39-
'PHPStan\\Analyser\\VariableLivenessResolver' => 'pending',
4039
];
4140

4241
/**

0 commit comments

Comments
 (0)