Drupal 10.1.x compatibility: Refactor system_time_zones() to use \Drupal\Core\Datetime\TimeZoneFormHelper::getOptionsList()

Created on 19 April 2023, over 1 year ago
Updated 6 March 2024, 10 months ago

Problem/Motivation

  • After Drupal 10.1.x, Fix the following warning at k8s_timezone_allowed_values_function():
    system_time_zones() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. This function is no longer used in Drupal core. Use \Drupal\Core\Datetime\TimeZoneFormHelper::getOptionsList(), \Drupal\Core\Datetime\TimeZoneFormHelper::getOptionsListByRegion() or \DateTimeZone::listIdentifiers() instead. See https://www.drupal.org/node/3023528
        25x in K8sCloudConfigTest::testCloudConfig from Drupal\Tests\k8s\Functional\cloud\config
        9x in K8sCloudConfigTest::testK8sMenu from Drupal\Tests\k8s\Functional\cloud\config
        4x in K8sCloudConfigTest::testCloudConfigRedirect from Drupal\Tests\k8s\Functional\cloud\config
        1x in K8sCloudConfigTest::testCloudConfigBulk from Drupal\Tests\k8s\Functional\cloud\config
    
💬 Support request
Status

Fixed

Version

6.0

Component

Code

Created by

🇺🇸United States yas California 🇺🇸

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024