Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294225

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

$
0
0

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

Viewing all articles
Browse latest Browse all 294225

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>