Skip to content

Commit 90137ed

Browse files
phpstan-botclaude
andcommitted
Fix invalid test: non-readonly class cannot extend readonly class
Make Child class readonly since PHP does not allow a non-readonly class to extend a readonly class. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 60538da commit 90137ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/PHPStan/Rules/Properties/data/bug-14063.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function withValue(string $newValue): self
1919
public function __construct(public string $value) {}
2020
}
2121

22-
class Child extends Base
22+
readonly class Child extends Base
2323
{
2424
public function withValue(string $newValue): self
2525
{

0 commit comments

Comments
 (0)