From bad64c04bf1ae977c373cfe789504f2138ae8562 Mon Sep 17 00:00:00 2001 From: catch <catch@35733.no-reply.drupal.org> Date: Tue, 9 Apr 2024 19:29:31 +0100 Subject: [PATCH] Issue #3439711 by nicxvan: Remove deprecated country call from 11.x --- .../Drupal/Core/Datetime/DateFormatter.php | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/core/lib/Drupal/Core/Datetime/DateFormatter.php b/core/lib/Drupal/Core/Datetime/DateFormatter.php index cd1c5f31bcfd..0b37969209ff 100644 --- a/core/lib/Drupal/Core/Datetime/DateFormatter.php +++ b/core/lib/Drupal/Core/Datetime/DateFormatter.php @@ -53,7 +53,6 @@ class DateFormatter implements DateFormatterInterface { */ protected $requestStack; - protected $country = NULL; protected $dateFormats = []; /** @@ -341,22 +340,4 @@ protected function dateFormat($type, $langcode) { return $this->dateFormats[$type][$langcode]; } - /** - * Returns the default country from config. - * - * @return string - * The config setting for country.default. - * - * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There will be a contrib replacement. See https://www.drupal.org/node/3439484 - * - * @see https://www.drupal.org/node/3439484 - */ - protected function country() { - @trigger_error('Calling ' . __METHOD__ . '() is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3439484', E_USER_DEPRECATED); - if ($this->country === NULL) { - $this->country = \Drupal::config('system.date')->get('country.default'); - } - return $this->country; - } - } -- GitLab