-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
phpstan/phpstan-src
#3049Labels
Milestone
Description
Bug report
When redeclaring a property that is present on a parent class PHPStan complains that the property is not initialized in the __construct(), even if it is present and initialized on the parent __construct() (and the child class calls parent::__construct()).
This error cannot be avoided since trying to reassign in the snipped provided will make PHP unhappy because it is a readonly property and can only be assigned once.
In case anyone wonders, I need to redeclare the property because on child class I want to add some doctrine attributes (ORM mapping)
Code snippet that reproduces the problem
https://phpstan.org/r/03e5be2a-69a2-493d-a67c-5f3069961815
Expected output
No issues
Did PHPStan help you today? Did it make you happy in any way?
PHPStan helps me and my team everyday ❤️
Reactions are currently unavailable