IntegerConverter not found for properties annotated with @var int
Attached you can find an working example package. The properties (and setter methods) in the DTO are annotated as 'int'.
On submitting the form, no suitable converter can be found. If the property is annotated with 'integer' it works as expected.
This should (imo) also work for 'int'.
The exact error message is:
#1297759968: Exception while property mapping for target type "TypeConverter\Test\Domain\Model\DTO\IntegerConverter", at property path "someProperty": No converter found which can be used to convert from "string" to "int".
Updated by Adrian Föder almost 8 years ago
- Category set to Property
- Assignee set to Philipp Maier
Since you've said you'll give it a try to fix it,
the actual conversion happens here, \TYPO3\Flow\Property\PropertyMapper::convert
I don't know ATM if the targetType should be normalized then already, or if this will be done at a later stage. Maybe you'll come up with an answer to that.
Have also a look at \TYPO3\Flow\Utility\TypeHandling::normalizeType :)