[Flow] Merge

Bastian Waidelich bastian at typo3.org
Thu Apr 9 12:18:29 CEST 2015


On 06.04.15, at 22:50, Toco wrote:

Hi,


> There exist at least two converters which handle the conversion from
> "string" to "array" with priority "-1"
>
> How do I circumvent this?

Change the priority of once ;)

See 
https://git.typo3.org/Packages/TYPO3.Flow.git/blob/HEAD:/Classes/TYPO3/Flow/Property/TypeConverter/MediaTypeConverter.php#l44

The default MediaTypeConverter is not meant to be used automatically by 
the PropertyMapper, that's why it sets the priority to -1.

In your custom implementation you can set it to a positive number (if 
you want it to be used automatically) or to any other negative number if 
you use it explicitly (which is the case in your scenario IIRC).

BTW: The exception is not necessary because it doesn't matter whether 
more than one matching converter exists with the same priority - as long 
as it's negative. I see if I can fix it in Flow.



-- 
Bastian Waidelich


More information about the Flow mailing list