--- a/rerolled-2157945-135.patch +++ /b/2157945-139.patch @@ -1,29 +1,25 @@ diff --git a/core/includes/common.inc b/core/includes/common.inc -index cc9677e750..b7685b0eb9 100644 +index b6582df851..48fef3dffe 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc -@@ -9,7 +9,6 @@ +@@ -8,11 +8,9 @@ + * a cached page are instead located in bootstrap.inc. */ - use Drupal\Component\Gettext\PoItem; -use Drupal\Component\Utility\Bytes; - use Drupal\Component\Utility\Environment; use Drupal\Component\Utility\Html; use Drupal\Component\Utility\SortArray; -@@ -20,7 +19,6 @@ - use Drupal\Core\Render\Element\Link; - use Drupal\Core\Render\HtmlResponseAttachmentsProcessor; - use Drupal\Core\Render\Markup; + use Drupal\Core\Cache\Cache; -use Drupal\Core\StringTranslation\TranslatableMarkup; /** * @defgroup php_wrappers PHP wrapper functions -@@ -250,48 +248,15 @@ function check_url($uri) { +@@ -132,48 +130,15 @@ * * @return \Drupal\Core\StringTranslation\TranslatableMarkup * A translated string representation of the size. + * -+ * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use ++ * @deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Use + * \Drupal::translation()->formatSize($size, $langcode) instead. + * + * @see https://www.drupal.org/node/2999981 @@ -69,13 +65,13 @@ - case 'YB': - return new TranslatableMarkup('@size YB', $args, $options); - } -+ @trigger_error('format_size() is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal::translation()->formatSize($size, $langcode) instead. See https://www.drupal.org/node/2999981.', E_USER_DEPRECATED); ++ @trigger_error('format_size() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Use \Drupal::translation()->formatSize($size, $langcode) instead. See https://www.drupal.org/node/2999981.', E_USER_DEPRECATED); + return \Drupal::translation()->formatSize($size, $langcode); } /** --- a/core/tests/Drupal/KernelTests/Core/Common/SizeTest.php +++ b/core/tests/Drupal/KernelTests/Core/Common/SizeTest.php @@ -14,12 +14,12 @@ @@ -581,7 +577,7 @@ + /** + * Tests deprecation of the format_size() function. + * -+ * @expectedDeprecation format_size() is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal::translation()->formatSize($size, $langcode) instead. See https://www.drupal.org/node/2999981. ++ * @expectedDeprecation format_size() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Use \Drupal::translation()->formatSize($size, $langcode) instead. See https://www.drupal.org/node/2999981. + * + * @group legacy + */