Bug #49372

ObjectConverter ignores implemented interface when mapping subtype

Added by Andreas Wolf over 8 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-06-24
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

When a method has a parameter that is annotated with an interface, the ObjectConverter cannot map classes implementing this interface to the parameter. The error message is

The given type "MyPackage\Domain\Model\MyTerm" is not a subtype of "SynSystems\Contracts\Domain\Model\Term"

The reason is that the inheritance chain check in getTargetTypeForSource() is only done for classes, but not for the interface.

No data to display

Also available in: Atom PDF