Replies: 1 comment
-
To get rid of this error you can write an extension as mentioned in https://phpstan.org/developing-extensions/always-read-written-properties, and you can mark your classes in whatever way you want:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If I have a Data-Transfer-Object, that I load with PDO:s
\PDO::FETCH_CLASS
,and mark it as read-only, then the codes works fine, but PhpStan complains:
Is there a phpdoc or attribute I can mark them with to avoid this error?
Or do i need to write an extension like mention in https://phpstan.org/developing-extensions/always-read-written-properties
That page mention something about Doctrine, can I borrow an attribute from Doctrine, even if I don't use Doctrine?
Beta Was this translation helpful? Give feedback.
All reactions