diff --git a/core/lib/Drupal/Core/Archiver/ArchiverManager.php b/core/lib/Drupal/Core/Archiver/ArchiverManager.php index e5545d74d7..cda6536e96 100644 --- a/core/lib/Drupal/Core/Archiver/ArchiverManager.php +++ b/core/lib/Drupal/Core/Archiver/ArchiverManager.php @@ -42,7 +42,7 @@ public function __construct(\Traversable $namespaces, CacheBackendInterface $cac $this->alterInfo('archiver_info'); $this->setCacheBackend($cache_backend, 'archiver_info_plugins'); if (!isset($file_system)) { - @trigger_error('Not defining the final $file_system argument to ' . __METHOD__ . ' is deprecated in drupal:8.8.3 and will throw an error in drupal:10.0.0.', E_USER_DEPRECATED); + @trigger_error('Calling ' . __METHOD__ . ' without the $file_system argument is deprecated in drupal:8.8.3 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3101299', E_USER_DEPRECATED); $file_system = \Drupal::service('file_system'); } $this->fileSystem = $file_system; diff --git a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php index 67974a9e57..28d0c248f5 100644 --- a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php +++ b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php @@ -73,7 +73,7 @@ public function __construct($root, ModuleHandlerInterface $module_handler, Theme $this->themeManager = $theme_manager; $this->streamWrapperManager = $stream_wrapper_manager; if (!$libraries_directory_file_finder) { - @trigger_error('Calling LibraryDiscoveryParser::__construct() without the $libraries_directory_file_finder argument is deprecated in drupal:8.9.0. The $libraries_directory_file_finder argument will be required in drupal:10.0.0. See https://www.drupal.org/node/3099614', E_USER_DEPRECATED); + @trigger_error('Calling ' . __METHOD__ . '() without the $libraries_directory_file_finder argument is deprecated in drupal:8.9.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3099614', E_USER_DEPRECATED); $libraries_directory_file_finder = \Drupal::service('library.libraries_directory_file_finder'); } $this->librariesDirectoryFileFinder = $libraries_directory_file_finder; diff --git a/core/lib/Drupal/Core/Database/Connection.php b/core/lib/Drupal/Core/Database/Connection.php index ee757249b2..0f38e67c32 100644 --- a/core/lib/Drupal/Core/Database/Connection.php +++ b/core/lib/Drupal/Core/Database/Connection.php @@ -211,13 +211,13 @@ abstract class Connection { */ public function __construct(\PDO $connection, array $connection_options) { if ($this->identifierQuotes === NULL) { - @trigger_error('In drupal:10.0.0 not setting the $identifierQuotes property in the concrete Connection class will result in an RuntimeException. See https://www.drupal.org/node/2986894', E_USER_DEPRECATED); + @trigger_error('Not setting the $identifierQuotes property in the concrete Connection class is deprecated in drupal:9.0.0 and will result in an RuntimeException in drupal:10.0.0. See https://www.drupal.org/node/2986894', E_USER_DEPRECATED); $this->identifierQuotes = ['', '']; } assert(count($this->identifierQuotes) === 2 && Inspector::assertAllStrings($this->identifierQuotes), '\Drupal\Core\Database\Connection::$identifierQuotes must contain 2 string values'); // The 'transactions' option is deprecated. if (isset($connection_options['transactions'])) { - @trigger_error('Passing a \'transactions\' connection option to ' . __METHOD__ . ' is deprecated in drupal:9.1.0 and is removed in drupal:10.0.0. All database drivers must support transactions. See https://www.drupal.org/node/2278745', E_USER_DEPRECATED); + @trigger_error('Passing a \'transactions\' connection option to ' . __METHOD__ . ' is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. All database drivers must support transactions. See https://www.drupal.org/node/2278745', E_USER_DEPRECATED); unset($connection_options['transactions']); } @@ -1544,7 +1544,7 @@ public function clientVersion() { * @see https://www.drupal.org/node/2278745 */ public function supportsTransactions() { - @trigger_error(__METHOD__ . ' is deprecated in drupal:9.1.0 and is removed in drupal:10.0.0. All database drivers must support transactions. See https://www.drupal.org/node/2278745', E_USER_DEPRECATED); + @trigger_error(__METHOD__ . ' is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. All database drivers must support transactions. See https://www.drupal.org/node/2278745', E_USER_DEPRECATED); return TRUE; } diff --git a/core/lib/Drupal/Core/Database/Database.php b/core/lib/Drupal/Core/Database/Database.php index 719dd29c4d..89f279f117 100644 --- a/core/lib/Drupal/Core/Database/Database.php +++ b/core/lib/Drupal/Core/Database/Database.php @@ -641,7 +641,7 @@ public static function getConnectionInfoAsUrl($key = 'default') { * @see https://www.drupal.org/node/3127769 */ protected static function getDatabaseDriverNamespace(array $connection_info) { - @trigger_error(__METHOD__ . " is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. There is no replacement as \$connection_info['namespace'] is always set. See https://www.drupal.org/node/3127769.", E_USER_DEPRECATED); + @trigger_error(__METHOD__ . " is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. There is no replacement as \$connection_info['namespace'] is always set. See https://www.drupal.org/node/3127769", E_USER_DEPRECATED); if (isset($connection_info['namespace'])) { return $connection_info['namespace']; } diff --git a/core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php b/core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php index 4585155c42..ddadf298c2 100644 --- a/core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php +++ b/core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php @@ -134,9 +134,14 @@ public function setRevisionLogMessage($revision_log_message) { * * @return string * The name of the field for the specified $key. + * + * @deprecated in drupal:9.0.0 and is removed from drupal:10.0.0. Use + * $entity_type->getRevisionMetadataKey() instead. + * + * @see https://www.drupal.org/node/2831499 */ protected static function getRevisionMetadataKey(EntityTypeInterface $entity_type, $key) { - @trigger_error(static::class . 'getRevisionMetadataKey() is deprecated in drupal:9.0.0 and is removed from drupal:10.0.0. Use $entity_type->getRevisionMetadataKey() instead. See: https://www.drupal.org/node/2831499', E_USER_DEPRECATED); + @trigger_error(static::class . 'getRevisionMetadataKey() is deprecated in drupal:9.0.0 and is removed from drupal:10.0.0. Use $entity_type->getRevisionMetadataKey() instead. See https://www.drupal.org/node/2831499', E_USER_DEPRECATED); /** @var \Drupal\Core\Entity\ContentEntityTypeInterface $entity_type */ return $entity_type->getRevisionMetadataKey($key); } diff --git a/core/lib/Drupal/Core/Extension/ThemeInstaller.php b/core/lib/Drupal/Core/Extension/ThemeInstaller.php index 860d79fe8d..0c1418ac6a 100644 --- a/core/lib/Drupal/Core/Extension/ThemeInstaller.php +++ b/core/lib/Drupal/Core/Extension/ThemeInstaller.php @@ -113,7 +113,7 @@ public function __construct(ThemeHandlerInterface $theme_handler, ConfigFactoryI $this->logger = $logger; $this->state = $state; if ($module_extension_list === NULL) { - @trigger_error('The extension.list.module service must be passed to ' . __NAMESPACE__ . '\ThemeInstaller::__construct(). It was added in drupal:8.9.0 and will be required before drupal:10.0.0.', E_USER_DEPRECATED); + @trigger_error('Calling ' . __METHOD__ . '() without the $module_extension_list argument is deprecated in drupal:8.9.0 and will be required before drupal:10.0.0. See https://www.drupal.org/node/2937955', E_USER_DEPRECATED); $module_extension_list = \Drupal::service('extension.list.module'); } $this->moduleExtensionList = $module_extension_list; diff --git a/core/lib/Drupal/Core/Theme/Registry.php b/core/lib/Drupal/Core/Theme/Registry.php index 094780a10e..b1d7b03dcd 100644 --- a/core/lib/Drupal/Core/Theme/Registry.php +++ b/core/lib/Drupal/Core/Theme/Registry.php @@ -495,7 +495,7 @@ protected function processExtension(array &$cache, $name, $type, $theme, $path) // if the theme hook specifies a function callback instead, check to // ensure the function actually exists. if (isset($info['function'])) { - trigger_error(sprintf('Theme functions are deprecated in drupal:8.0.0 and are removed from drupal:10.0.0. Use Twig templates instead of %s(). See https://www.drupal.org/node/1831138', $info['function']), E_USER_DEPRECATED); + trigger_error(sprintf('Usage of theme functions is deprecated in drupal:8.0.0 and are removed from drupal:10.0.0. Use Twig templates instead of %s(). See https://www.drupal.org/node/1831138', $info['function']), E_USER_DEPRECATED); if (!function_exists($info['function'])) { throw new \BadFunctionCallException(sprintf( 'Theme hook "%s" refers to a theme function callback that does not exist: "%s"', diff --git a/core/modules/rest/tests/src/Functional/BcTimestampNormalizerUnixTestTrait.php b/core/modules/rest/tests/src/Functional/BcTimestampNormalizerUnixTestTrait.php index 054ce7c8ae..4f38dd7a7e 100644 --- a/core/modules/rest/tests/src/Functional/BcTimestampNormalizerUnixTestTrait.php +++ b/core/modules/rest/tests/src/Functional/BcTimestampNormalizerUnixTestTrait.php @@ -2,7 +2,7 @@ namespace Drupal\Tests\rest\Functional; -@trigger_error(__NAMESPACE__ . '\BcTimestampNormalizerUnixTestTrait is deprecated in Drupal 9.0.0 and will be removed before Drupal 10.0.0. Instead of BcTimestampNormalizerUnixTestTrait::formatExpectedTimestampItemValues(123456789), use (new \DateTime())->setTimestamp(123456789)->setTimezone(new \DateTimeZone("UTC"))->format(\DateTime::RFC3339), see https://www.drupal.org/node/2859657.', E_USER_DEPRECATED); +@trigger_error(__NAMESPACE__ . '\BcTimestampNormalizerUnixTestTrait is deprecated in drupal:9.0.0 and is removed in drupal:10.0.0. Instead of BcTimestampNormalizerUnixTestTrait::formatExpectedTimestampItemValues(123456789), use (new \DateTime())->setTimestamp(123456789)->setTimezone(new \DateTimeZone("UTC"))->format(\DateTime::RFC3339). See https://www.drupal.org/node/2859657', E_USER_DEPRECATED); /** * Trait for ResourceTestBase subclasses formatting expected timestamp data. diff --git a/core/modules/system/src/Controller/SystemController.php b/core/modules/system/src/Controller/SystemController.php index a04724fe80..033fc5a63a 100644 --- a/core/modules/system/src/Controller/SystemController.php +++ b/core/modules/system/src/Controller/SystemController.php @@ -87,7 +87,7 @@ public function __construct(SystemManager $systemManager, ThemeAccessCheck $them $this->themeHandler = $theme_handler; $this->menuLinkTree = $menu_link_tree; if ($module_extension_list === NULL) { - @trigger_error('The extension.list.module service must be passed to ' . __NAMESPACE__ . '\SystemController::__construct. It was added in Drupal 8.9.0 and will be required before Drupal 10.0.0.', E_USER_DEPRECATED); + @trigger_error('Calling ' . __METHOD__ . ' without $module_extension_list argument is deprecated in drupal:8.9.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/2937955', E_USER_DEPRECATED); $module_extension_list = \Drupal::service('extension.list.module'); } $this->moduleExtensionList = $module_extension_list; diff --git a/core/modules/system/tests/modules/deprecation_test/deprecation_test.module b/core/modules/system/tests/modules/deprecation_test/deprecation_test.module index 95aaa69b80..d66f7a59c5 100644 --- a/core/modules/system/tests/modules/deprecation_test/deprecation_test.module +++ b/core/modules/system/tests/modules/deprecation_test/deprecation_test.module @@ -14,7 +14,7 @@ * @deprecated in drupal:8.4.0 and is removed from drupal:9.0.0. This is * the deprecation message for deprecated_test_function(). * - * @see https://www.drupal.org/project/drupal/issues/2870194 + * @see https://www.drupal.org/node/2811561 */ function deprecation_test_function() { @trigger_error('This is the deprecation message for deprecation_test_function().', E_USER_DEPRECATED); diff --git a/core/tests/Drupal/KernelTests/Core/Database/ConnectionTest.php b/core/tests/Drupal/KernelTests/Core/Database/ConnectionTest.php index b56e4cc4c1..9ace24de79 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/ConnectionTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/ConnectionTest.php @@ -122,8 +122,8 @@ public function testConnectionOptions() { * Tests the deprecation of the 'transactions' connection option. * * @group legacy - * @expectedDeprecation Passing a 'transactions' connection option to Drupal\Core\Database\Connection::__construct is deprecated in drupal:9.1.0 and is removed in drupal:10.0.0. All database drivers must support transactions. See https://www.drupal.org/node/2278745 - * @expectedDeprecation Drupal\Core\Database\Connection::supportsTransactions is deprecated in drupal:9.1.0 and is removed in drupal:10.0.0. All database drivers must support transactions. See https://www.drupal.org/node/2278745 + * @expectedDeprecation Passing a 'transactions' connection option to Drupal\Core\Database\Connection::__construct is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. All database drivers must support transactions. See https://www.drupal.org/node/2278745 + * @expectedDeprecation Drupal\Core\Database\Connection::supportsTransactions is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. All database drivers must support transactions. See https://www.drupal.org/node/2278745 */ public function testTransactionsOptionDeprecation() { $connection_info = Database::getConnectionInfo('default'); diff --git a/core/tests/Drupal/KernelTests/Core/Theme/RegistryLegacyTest.php b/core/tests/Drupal/KernelTests/Core/Theme/RegistryLegacyTest.php index 350f2accb4..c4275ba025 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/RegistryLegacyTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/RegistryLegacyTest.php @@ -27,7 +27,7 @@ class RegistryLegacyTest extends KernelTestBase { /** * Tests the theme registry with theme functions and multiple subthemes. * - * @expectedDeprecation Unsilenced deprecation: Theme functions are deprecated in drupal:8.0.0 and are removed from drupal:10.0.0. Use Twig templates instead of theme_theme_test(). See https://www.drupal.org/node/1831138 + * @expectedDeprecation Unsilenced deprecation: Usage of theme functions is deprecated in drupal:8.0.0 and are removed from drupal:10.0.0. Use Twig templates instead of theme_theme_test(). See https://www.drupal.org/node/1831138 */ public function testMultipleSubThemes() { $theme_handler = \Drupal::service('theme_handler'); @@ -47,7 +47,7 @@ public function testMultipleSubThemes() { /** * Tests the theme registry with theme functions with suggestions. * - * @expectedDeprecation Unsilenced deprecation: Theme functions are deprecated in drupal:8.0.0 and are removed from drupal:10.0.0. Use Twig templates instead of test_legacy_theme_theme_test_preprocess_suggestions__kitten__meerkat(). See https://www.drupal.org/node/1831138 + * @expectedDeprecation Unsilenced deprecation: Usage of theme functions is deprecated in drupal:8.0.0 and are removed from drupal:10.0.0. Use Twig templates instead of test_legacy_theme_theme_test_preprocess_suggestions__kitten__meerkat(). See https://www.drupal.org/node/1831138 */ public function testSuggestionPreprocessFunctions() { $theme_handler = \Drupal::service('theme_handler'); diff --git a/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php b/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php index e91ca645f7..4beb94ea0b 100644 --- a/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php +++ b/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php @@ -539,7 +539,7 @@ public function testEscapeDatabase($expected, $name, array $identifier_quote = [ /** * @covers ::__construct - * @expectedDeprecation In drupal:10.0.0 not setting the $identifierQuotes property in the concrete Connection class will result in an RuntimeException. See https://www.drupal.org/node/2986894 + * @expectedDeprecation Not setting the $identifierQuotes property in the concrete Connection class is deprecated in drupal:9.0.0 and will result in an RuntimeException in drupal:10.0.0. See https://www.drupal.org/node/2986894 * @group legacy */ public function testIdentifierQuotesDeprecation() { diff --git a/core/tests/Drupal/Tests/Core/Theme/RegistryLegacyTest.php b/core/tests/Drupal/Tests/Core/Theme/RegistryLegacyTest.php index 20fdd80c08..c38c1db8f2 100644 --- a/core/tests/Drupal/Tests/Core/Theme/RegistryLegacyTest.php +++ b/core/tests/Drupal/Tests/Core/Theme/RegistryLegacyTest.php @@ -83,7 +83,7 @@ protected function setUp(): void { /** * Tests getting legacy theme function registry data defined by a module. * - * @expectedDeprecation Unsilenced deprecation: Theme functions are deprecated in drupal:8.0.0 and are removed from drupal:10.0.0. Use Twig templates instead of theme_theme_test(). See https://www.drupal.org/node/1831138 + * @expectedDeprecation Unsilenced deprecation: Usage of theme functions is deprecated in drupal:8.0.0 and are removed from drupal:10.0.0. Use Twig templates instead of theme_theme_test(). See https://www.drupal.org/node/1831138 */ public function testGetLegacyThemeFunctionRegistryForModule() { $test_theme = new ActiveTheme([ diff --git a/core/tests/Drupal/Tests/Listeners/DrupalListener.php b/core/tests/Drupal/Tests/Listeners/DrupalListener.php index 83105089d0..46fa05dc90 100644 --- a/core/tests/Drupal/Tests/Listeners/DrupalListener.php +++ b/core/tests/Drupal/Tests/Listeners/DrupalListener.php @@ -48,7 +48,7 @@ public function startTest(Test $test): void { $reflected_method = $class->getMethod($method); if ($reflected_method->getDeclaringClass()->getName() === get_class($test)) { if (!$reflected_method->hasReturnType() || $reflected_method->getReturnType()->getName() !== 'void') { - @trigger_error("Declaring ::$method without a void return typehint in " . get_class($test) . " is deprecated in drupal:9.0.0. Typehinting will be required before drupal:10.0.0. See https://www.drupal.org/node/3114724", E_USER_DEPRECATED); + @trigger_error("Declaring ::$method without a void return typehint in " . get_class($test) . " is deprecated in drupal:9.0.0 and Typehinting will be required before drupal:10.0.0. See https://www.drupal.org/node/3114724", E_USER_DEPRECATED); } } }