Bug #49372
ObjectConverter ignores implemented interface when mapping subtype
Status: | New | Start date: | 2013-06-24 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | - | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: | No | Affected Flow version: | Git 2.0 |
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.