Skip to content

Commit 6616ed4

Browse files
authored
Merge branch '5.next' into docs-strategy-default-change
2 parents 2eb4f45 + 32d1074 commit 6616ed4

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

docs/en/appendices/5-4-migration-guide.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ bin/cake upgrade rector --rules cakephp54 <path/to/app/src>
1616

1717
## Behavior Changes
1818

19+
### I18n
20+
21+
``Number::parseFloat()`` now returns ``null`` instead of ``0.0`` when parsing
22+
fails. Previously, when ``NumberFormatter::parse()`` failed it returned ``false``,
23+
which was cast to ``0.0``. This silently converted invalid input like ``"abc"``
24+
to ``0.0``, making it impossible to distinguish from valid ``"0"`` input.
25+
26+
This also affects ``FloatType`` and ``DecimalType`` database types which use
27+
``Number::parseFloat()`` internally. Invalid locale-formatted form input will
28+
now result in ``null`` entity values instead of ``0``.
29+
1930
### ORM
2031

2132
The default eager loading strategy for `HasMany` and `BelongsToMany` associations

0 commit comments

Comments
 (0)