[FEATURE] Add configuration options to FloatConverter
Converting a string to a float value needs some specific format of the string (no thousand separator and '.' as decimal point). So it should be possible to define some pre-sanitation for the FloatConverter to be able to convert strings like 123,42 to float. This patch introduces configuration options and sanitizes the string before parsing it to float. Resolves: #75827 Releases: master Change-Id: I716a5a6d3b7dd4f9f8dd0f01db850a2ee82cd376 Reviewed-on: https://review.typo3.org/47829 Reviewed-by:Stephan Großberndt <stephan@grossberndt.de> Tested-by:
Stephan Großberndt <stephan@grossberndt.de> Reviewed-by:
Philipp Gampe <philipp.gampe@typo3.org> Tested-by:
Philipp Gampe <philipp.gampe@typo3.org>
Showing
- typo3/sysext/core/Documentation/Changelog/master/Feature-75827-AddConfigurationOptionsToFloatConverter.rst 27 additions, 0 deletions...Feature-75827-AddConfigurationOptionsToFloatConverter.rst
- typo3/sysext/extbase/Classes/Property/TypeConverter/FloatConverter.php 19 additions, 1 deletion...extbase/Classes/Property/TypeConverter/FloatConverter.php
- typo3/sysext/extbase/Tests/Unit/Property/TypeConverter/FloatConverterTest.php 19 additions, 0 deletions.../Tests/Unit/Property/TypeConverter/FloatConverterTest.php
Loading
Please register or sign in to comment