From 2b63289407224803b282a381038edc0ae4d76ccd Mon Sep 17 00:00:00 2001 From: phenaproxima <phenaproxima@205645.no-reply.drupal.org> Date: Tue, 16 Aug 2022 18:09:01 +0000 Subject: [PATCH] Issue #3303953 by phenaproxima: Adjust deprecations --- package_manager/src/PathLocator.php | 4 ++-- package_manager/tests/src/Unit/PathLocatorTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package_manager/src/PathLocator.php b/package_manager/src/PathLocator.php index 723eb1b920..ab5262f2ed 100644 --- a/package_manager/src/PathLocator.php +++ b/package_manager/src/PathLocator.php @@ -45,12 +45,12 @@ class PathLocator { public function __construct(string $app_root, ConfigFactoryInterface $config_factory = NULL, FileSystemInterface $file_system = NULL) { $this->appRoot = $app_root; if (empty($config_factory)) { - @trigger_error('Calling ' . __METHOD__ . '() without the $config_factory argument is deprecated in automatic_updates:2.0.1 and will be required before automatic_updates:3.0.0. See https://www.drupal.org/node/3300008.', E_USER_DEPRECATED); + @trigger_error('Calling ' . __METHOD__ . '() without the $config_factory argument is deprecated in automatic_updates:8.x-2.1 and will be required before automatic_updates:3.0.0. See https://www.drupal.org/node/3300008.', E_USER_DEPRECATED); $config_factory = \Drupal::configFactory(); } $this->configFactory = $config_factory; if (empty($file_system)) { - @trigger_error('Calling ' . __METHOD__ . '() without the $file_system argument is deprecated in automatic_updates:2.0.1 and will be required before automatic_updates:3.0.0. See https://www.drupal.org/node/3300008.', E_USER_DEPRECATED); + @trigger_error('Calling ' . __METHOD__ . '() without the $file_system argument is deprecated in automatic_updates:8.x-2.1 and will be required before automatic_updates:3.0.0. See https://www.drupal.org/node/3300008.', E_USER_DEPRECATED); $file_system = \Drupal::service('file_system'); } $this->fileSystem = $file_system; diff --git a/package_manager/tests/src/Unit/PathLocatorTest.php b/package_manager/tests/src/Unit/PathLocatorTest.php index 0c67904263..285247ee17 100644 --- a/package_manager/tests/src/Unit/PathLocatorTest.php +++ b/package_manager/tests/src/Unit/PathLocatorTest.php @@ -45,10 +45,10 @@ class PathLocatorTest extends UnitTestCase { $container->set('file_system', $this->createMock(FileSystemInterface::class)); \Drupal::setContainer($container); - $this->expectDeprecation('Calling ' . PathLocator::class . '::__construct() without the $config_factory argument is deprecated in automatic_updates:2.0.1 and will be required before automatic_updates:3.0.0. See https://www.drupal.org/node/3300008.'); + $this->expectDeprecation('Calling ' . PathLocator::class . '::__construct() without the $config_factory argument is deprecated in automatic_updates:8.x-2.1 and will be required before automatic_updates:3.0.0. See https://www.drupal.org/node/3300008.'); new PathLocator('/path/to/drupal', NULL, $container->get('file_system')); - $this->expectDeprecation('Calling ' . PathLocator::class . '::__construct() without the $file_system argument is deprecated in automatic_updates:2.0.1 and will be required before automatic_updates:3.0.0. See https://www.drupal.org/node/3300008.'); + $this->expectDeprecation('Calling ' . PathLocator::class . '::__construct() without the $file_system argument is deprecated in automatic_updates:8.x-2.1 and will be required before automatic_updates:3.0.0. See https://www.drupal.org/node/3300008.'); new PathLocator('/path/to/drupal', $container->get('config.factory')); } -- GitLab