By mondrake on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.2.x
Introduced in version:
10.2.0
Issue links:
Description:
The format_size() function in common.inc is deprecated in favour of using \Drupal\Core\StringTranslation\ByteSizeMarkup::create() that returns TranslatableMarkup
Example:
Before:
...
$size_literal = format_size(81862076662);
...
After:
...
use Drupal\Core\StringTranslation\ByteSizeMarkup;
...
$size_literal = ByteSizeMarkup::create(81862076662);
...
Both before and after the result will be a string '76.24 GB'.
Impacts:
Module developers