phpstan-drupal
phpstan-drupal copied to clipboard
Remove/change scope of readonly properties vs DependencySerializationTrait warning
Bug report
Slightly related to the conversation in https://github.com/phpstan/phpstan/issues/6562.
PHPstan Drupal currently warns about readonly properties are not supported by DependencySerializationTrait, but that is not necessarily true. Using those does not cause any fatal errors as long as properties only initiated once, like in Entity type defs, Entity access control handlers, etc.
The this rule (clause) was introduced in #731 PR and there was a dedicated thread about whether the readonly warning is universally true.