Skip to content

Commit 092d8e3

Browse files
committed
Result cache - notice change in final class constant (PHP 8.1)
1 parent c19506b commit 092d8e3

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/Dependency/ExportedNode/ExportedClassConstantNode.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ class ExportedClassConstantNode implements ExportedNode, JsonSerializable
1616

1717
private bool $private;
1818

19+
private bool $final;
20+
1921
private ?ExportedPhpDocNode $phpDoc;
2022

21-
public function __construct(string $name, string $value, bool $public, bool $private, ?ExportedPhpDocNode $phpDoc)
23+
public function __construct(string $name, string $value, bool $public, bool $private, bool $final, ?ExportedPhpDocNode $phpDoc)
2224
{
2325
$this->name = $name;
2426
$this->value = $value;
2527
$this->public = $public;
2628
$this->private = $private;
29+
$this->final = $final;
2730
$this->phpDoc = $phpDoc;
2831
}
2932

@@ -48,7 +51,8 @@ public function equals(ExportedNode $node): bool
4851
return $this->name === $node->name
4952
&& $this->value === $node->value
5053
&& $this->public === $node->public
51-
&& $this->private === $node->private;
54+
&& $this->private === $node->private
55+
&& $this->final === $node->final;
5256
}
5357

5458
/**
@@ -62,6 +66,7 @@ public static function __set_state(array $properties): ExportedNode
6266
$properties['value'],
6367
$properties['public'],
6468
$properties['private'],
69+
$properties['final'],
6570
$properties['phpDoc']
6671
);
6772
}
@@ -77,6 +82,7 @@ public static function decode(array $data): ExportedNode
7782
$data['value'],
7883
$data['public'],
7984
$data['private'],
85+
$data['final'],
8086
$data['phpDoc'],
8187
);
8288
}
@@ -93,6 +99,7 @@ public function jsonSerialize()
9399
'value' => $this->value,
94100
'public' => $this->public,
95101
'private' => $this->private,
102+
'final' => $this->final,
96103
'phpDoc' => $this->phpDoc,
97104
],
98105
];

src/Dependency/ExportedNodeResolver.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ public function resolve(string $fileName, \PhpParser\Node $node): ?ExportedNode
207207
$this->printer->prettyPrintExpr($node->value),
208208
$parentNode->isPublic(),
209209
$parentNode->isPrivate(),
210+
$parentNode->isFinal(),
210211
$this->exportPhpDocNode(
211212
$fileName,
212213
$classNode->namespacedName->toString(),

0 commit comments

Comments
 (0)