flarum / framework

Simple forum software for building great communities.
http://flarum.org/
6.23k stars 830 forks source link

fix: change return type of hasOne and belongsTo to nullable object type. #3979

Open novacuum opened 3 months ago

novacuum commented 3 months ago

Maybe there is a different sollution than with UnionType, but I found no hints about setting the ObjectType as nullable one.

Fixes: no issues

Changes proposed in this pull request: Change return type of hasOne and belongsTo to nullable object type in the RelationProperty Phpstan Reflection Class.

Reviewers should focus on: Is this Valid in every case, is there a case where nullable is not true?

Screenshot

Necessity

Confirmed