Task #102263
closedReturn string version of Stringable objects in DataMapper::getPlainValue
100%
Description
The DataMapper::getPlainValue expects a object to be a instance of TypeInterface in order to return a plain value.
The TypoInterface holds the `__toString` method - making it `a instance of Stringable`.
Objects/value objects coming from own extensions, not implementing the TypeInterface but being a `Stringable` (either by `implements \Stringable` or having the `__toString` method) throws the exception
`throw new UnexpectedTypeException('An object of class "' . get_class($input) . '" could not be converted to a plain value.', 1274799934);`
Suggestion here, being that the condition also allows a object being a stringable
From:
`if (TypeHandlingUtility::isCoreType($input)) {`
To:
`if (TypeHandlingUtility::isCoreType($input) || ($input instanceof \Stringable)) {`