Support typed parameters for class schemata, persistence, validation
When a domain model contains an array member variable and expects objects (of a certain kind) in that array, this can currently not be validated automatically. Additionally request parameters cannot be mapped from UUIDs to objects in such cases (because the class schema knows only about the array type).
Solution: Implement typed array using a syntax inspired by Java's Generics so that class schemata can find out about the intended contents of an array:
/** * @var array<\F3\Blog\Domain\Model\Post> */ protected $relatedPosts = array();
That would limit $relatedPosts to values of type \F3\Blog\Domain\Model\Post.