Skip to content

Add a test covering a hooked property in a readonly class#3809

Merged
ondrejmirtes merged 1 commit intophpstan:2.1.xfrom
jakubtobiasz:readonly-classes-cannot-have-hooked-properties
Feb 6, 2025
Merged

Add a test covering a hooked property in a readonly class#3809
ondrejmirtes merged 1 commit intophpstan:2.1.xfrom
jakubtobiasz:readonly-classes-cannot-have-hooked-properties

Conversation

@jakubtobiasz
Copy link
Copy Markdown
Contributor

@jakubtobiasz jakubtobiasz commented Feb 5, 2025

$node->isReadOnly() returns true when a property lives inside a readonly class, so I've added only a simple test to existing test suite :).

Fulfills Readonly classes cannot have hooked properties (ref: phpstan/phpstan#12336)

@ondrejmirtes ondrejmirtes merged commit d0b4a27 into phpstan:2.1.x Feb 6, 2025
267 checks passed
@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you very much! BTW each item in the linked issue does not have to be a separate PR, you can do multiple items at once if they are related :)

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