diff --git a/docs/running_psalm/issues/MissingConstructor.md b/docs/running_psalm/issues/MissingConstructor.md index d14b9cc1b85..297a3e0c47b 100644 --- a/docs/running_psalm/issues/MissingConstructor.md +++ b/docs/running_psalm/issues/MissingConstructor.md @@ -1,6 +1,16 @@ # MissingConstructor -Emitted when non-null properties without default values are defined in a class without a `__construct` method +Unitialized properties are statically hard to analyze. To prevent mistakes, Psalm will enforce that all properties should be initialized. + +It does that through [PropertyNotSetInConstructor](issues/PropertyNotSetInConstructor.md) and this issue. + +Psalm will then assume every property in the codebase is initialized. + +Doing that allows it to report missing initializations as well as [RedundantPropertyInitializationCheck](issues/RedundantPropertyInitializationCheck.md) + +This issue is emitted when non-null properties without default values are defined in a class without a `__construct` method + +If your project rely on having uninitialized properties, it is advised to suppress this issue, as well as [PropertyNotSetInConstructor](issues/PropertyNotSetInConstructor.md) and [RedundantPropertyInitializationCheck](issues/RedundantPropertyInitializationCheck.md). ```php