instride-ch / pimcore-data-definitions

Data Definitions Plugin for Pimcore
Other
78 stars 58 forks source link

Disable value trimming for default_value interpreter #407

Open dolmit-tanel-paaro opened 1 year ago

dolmit-tanel-paaro commented 1 year ago
Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets -

In our project, we wanted to import single space strings using default_value interpreter. To our surprise, we couldn't, as Symfony trims the value by default.

In my opinion, the interpreter should not modify the value, ever. It's up to user to validate it.

dpfaffenbauer commented 4 months ago

@dolmit-tanel-paaro this is a BC break and should be configurable

dolmit-tanel-paaro commented 4 months ago

@dpfaffenbauer I don't see the reason to make it configurable. This is because the value should never be altered - it should be whatever the user has defined.
I suggest to mention this change in the upgrade notes so people can check their default value interpreters configuration.

dpfaffenbauer commented 4 months ago

@dolmit-tanel-paaro Problem is that its been altered since we have that interpreter, if we change it, we might mess up existing definitions.