Update the documentation of Number::toReadableSize() to new specifications#8227
Open
j04chim wants to merge 3 commits intocakephp:5.nextfrom
Open
Update the documentation of Number::toReadableSize() to new specifications#8227j04chim wants to merge 3 commits intocakephp:5.nextfrom
j04chim wants to merge 3 commits intocakephp:5.nextfrom
Conversation
josbeir
requested changes
Feb 10, 2026
| need to pass the boolean parameter to `Cake\I18n\Number::toReadableSize()` when | ||
| switching between decimal units and IEC units. If `$useIec` is defined as true, | ||
| IEC units will be employed; otherwise, decimal units will be used. | ||
|
|
Contributor
There was a problem hiding this comment.
Could you add a little indication that notes when this feature was added? The docs are continues per major so this could be helpful.
Something like
::: info Added in version 5.4
My note here
:::
josbeir
requested changes
Feb 10, 2026
Contributor
josbeir
left a comment
There was a problem hiding this comment.
Could you also note this change in the migration guide ?
https://github.com/cakephp/docs/blob/5.next/docs/en/appendices/5-4-migration-guide.md
dereuromark
reviewed
Feb 10, 2026
|
|
||
| ## Breaking Changes | ||
|
|
||
| - `Number::toReadableSize()` now calculates decimal units (KB, MB, GB and TB) |
Member
There was a problem hiding this comment.
I thought we added the new way as BC flag. To opt in.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here are my proposed updates to the documentation for Number::toReadableSize(). I did not modify the Japanese version.