Skip to content

Commit 9609025

Browse files
authored
Add Number::toReadableSize() changes to migration guide
1 parent d509f3d commit 9609025

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ automating some of the migration work. Run rector before updating your
1414
bin/cake upgrade rector --rules cakephp54 <path/to/app/src>
1515
```
1616

17+
## Breaking Changes
18+
19+
- `Number::toReadableSize()` now calculates decimal units (KB, MB, GB and TB)
20+
using an exponent of ten, meaning that 1 KB is 1000 Bytes. The units from the
21+
previous calculation method, where 1024 Bytes equaled 1 KB, have been changed
22+
to KiB, MiB, GiB, and TiB as defined in ISO/IEC 80000-13. It is possible to
23+
switch between the two units using a new optional boolean parameter in
24+
`Number::toReadableSize()`, as well as the new global setter `Number::setUseIecUnits()`.
25+
1726
## Behavior Changes
1827

1928
- WIP

0 commit comments

Comments
 (0)