Description
When casting or serializing propertys that are typed to an interface the CasterFactory/SerializerFactory do not read the CastWith/SerializeWith attributes from interfaces definition.
As I see it, changes (if ($*With === null && ($type->isClass() || $type->isInterface())) {) need to be made here:
|
if ($castWith === null && $type->isClass()) { |
and here:
|
if ($serializeWith === null && $type->isClass()) { |
Benefits
Less need for adding CastWith/SerializeWith attributes to properties typed to interfaces and more getting out of the way.