You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In version 4.12.0 of Psalm there are increased levels of problems with constructor property promotion - any @var annotations within constructor property promotion for public properties leads to those properties not even existing to Psalm:
ERROR: InvalidDocblock - 9:9 - Param string of A::__construct should be documented as a param or a property, not both
ERROR: UndefinedPropertyAssignment - 15:1 - Instance property A::$string is not defined
The text was updated successfully, but these errors were encountered:
<?phpfinalclass A
{
publicfunction__construct(
/** * @var string Some documentation for what the values of this string could be */publicstring$string,
) {
}
}
$a = newA('dada');
$a->string = 'da';
Psalm output (using commit 9491ea4):
ERROR: InvalidDocblock - 9:9 - Param string of A::__construct should be documented as a param or a property, not both
ERROR: UndefinedPropertyAssignment - 15:1 - Instance property A::$string is not defined
In version 4.12.0 of Psalm there are increased levels of problems with constructor property promotion - any
@var
annotations within constructor property promotion for public properties leads to those properties not even existing to Psalm:https://psalm.dev/r/db3ba03f68
Gives the errors:
The text was updated successfully, but these errors were encountered: