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

Created on 17 December 2013, about 11 years ago
Updated 16 September 2023, over 1 year 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 about 12 hours 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.71.5 2024