Deprecate format_size() and use Drupal\Core\StringTranslation\ByteSizeMarkup instead

Created on 17 December 2013, over 10 years ago
Updated 16 September 2023, 9 months ago

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 returns TranslatableMarkup
  • 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
📌 Task
Status

Fixed

Version

11.0 🔥

Component
Base 

Last updated less than a minute ago

Created by

🇮🇹Italy plach Venezia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024