Problem/Motivation
format_size()
is still a procedural function. Convert it to a object oriented code.
Proposed resolution
- Add a
\Drupal\Core\StringTranslation\ByteSizeMarkup::create()
method that returnsTranslatableMarkup
- Deprecate and remove usages of
format_size()
. - Add related PHP unit tests.
Remaining tasks
review/commit
User interface changes
none
API changes
format_size()
is deprecated- A new
Drupal\Core\StringTranslation\ByteSizeMarkup
class is added