Bug #47054

IntegerConverter not found for properties annotated with @var int

Added by Philipp Maier almost 8 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Property
Target version:
-
Start date:
2013-04-08
Due date:
% Done:

100%

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

Description

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".


Files

TypeConverter.Test.zip (4.42 KB) TypeConverter.Test.zip Example package which reproduces the bug Philipp Maier, 2013-04-08 21:00
#1

Updated by Philipp Maier almost 8 years ago

Ofc I should attach said package now, should I? :)

#2

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 :)

#3

Updated by Philipp Maier almost 8 years ago

This also happens with bool <> boolean.
And yup, I'm on it.

#4

Updated by Gerrit Code Review almost 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19769

#5

Updated by Gerrit Code Review almost 8 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19769

#6

Updated by Gerrit Code Review almost 8 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19769

#7

Updated by Gerrit Code Review almost 8 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19769

#8

Updated by Gerrit Code Review almost 8 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19769

#9

Updated by Gerrit Code Review almost 8 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19769

#10

Updated by Gerrit Code Review almost 8 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19769

#11

Updated by Gerrit Code Review almost 8 years ago

Patch set 8 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19769

#12

Updated by Gerrit Code Review over 7 years ago

Patch set 1 for branch 2.0 has been pushed to the review server.
It is available at https://review.typo3.org/20358

#13

Updated by Gerrit Code Review over 7 years ago

Patch set 1 for branch FLOW3-1.1 has been pushed to the review server.
It is available at https://review.typo3.org/20359

#14

Updated by Philipp Maier over 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF