Feature: #94117 - Improve extbase type converter registration¶
Extbase type converters are an important part of the extbase data and property mapping mechanism. Those converters usually convert data from simple types to objects or other simple types.
Extension authors can add their own type converters. This was previously done
by registering the type converter class in the
file and adding the configuration, such as the
priority as class properties, accessible via public methods.
This has now been improved. Type converters are now registered as container
services in the extensions'
Services.yaml file by tagging the service
extbase.type_converter and adding the configuration as tag
This means, the registration via php:
can be removed together with the configuration related class properties and
methods. See changelog
for more information.
Registration is now done in your
Services.yaml like the following:
services: Vendor\Extension\Property\TypeConverter\MyBooleanConverter: tag: - name: extbase.type_converter priority: 10 target: boolean sources: boolean,string
Tag arguments (priority, target ,sources, etc.) have to be simple types. Don't register the sources as array but as comma seperated list as shown in the example.
Since the configuration (priority, target and sources) are now done at this place, respective type converter properties are now superfluous and will also no longer be evaluated. See the deprecation changelog for more information.