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
When using non-nullable typed property marked as @persistent Error Typed property must not be accessed before initialization is thrown
This can be fixed by using nullable public ?int $id = null but I think that clearly marking variable as required for presenter is better for code readability.
Throw something like BadRequestException Missing parameter $id required by SomePresenter for typed properties
or
Do not throw error and skip all unitialized (or null) persistent values just by isset check
The text was updated successfully, but these errors were encountered:
Version: 3.1.2
Bug Description
When using non-nullable typed property marked as
@persistent
ErrorTyped property must not be accessed before initialization
is thrownThis can be fixed by using nullable
public ?int $id = null
but I think that clearly marking variable as required for presenter is better for code readability.Error occurs here:
application/src/Application/UI/Component.php
Line 164 in 1ed2d0a
Steps To Reproduce
Possible Solution
Throw something like BadRequestException
Missing parameter $id required by SomePresenter
for typed propertiesor
Do not throw error and skip all unitialized (or null) persistent values just by isset check
The text was updated successfully, but these errors were encountered: