As great as this package is, it still has some limitations. 😉
This is a list of know limitations and missing features of the mapper that you have to take into account when using.
If you would find any more limitations, please report the through GitHub issues.
Array shapes are currently not supported. However, this is something we want to support and should be added somewhere in the near future.
/**
* @var array{
* bar: string,
* baz: string|int|null,
* }
*/
private array $foo;
At this moment, generics are only supported for array keys and values. There is no support for generics when using objects.
When trying to map generics now, the mapper will likely crash as it cannot resolve the requested type.
/** @var Collection<User> */
private Collection $users;