Deprecated - 9.5.x - drupal

Examples: "before Drupal 9", "in Drupal 8.4"
Title File name Deprecation Type Direct uses Namespaced uses Overrides Use statements
AssertLegacyTrait::buildXPathQuery core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php

in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->buildXPathQuery() instead.

function 1
AssertLegacyTrait::constructFieldXpath core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php

in drupal:8.5.0 and is removed from drupal:10.0.0. Use $this->getSession()->getPage()->findField() instead.

function 1
AssertLegacyTrait::getAllOptions core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php

in drupal:8.5.0 and is removed from drupal:10.0.0. Use $element->findAll('xpath', 'option') instead.

function 1
AssertLegacyTrait::getRawContent core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php

in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->getSession()->getPage()->getContent() instead.

function 1
AssertLegacyTrait::pass core/tests/Drupal/KernelTests/AssertLegacyTrait.php

in drupal:8.0.0 and is removed from drupal:10.0.0. PHPUnit interrupts a test as soon as a test assertion fails, so there is usually no need to call this method. If a test's logic relies on this method, refactor the test.

function 1
AssertLegacyTrait::verbose core/tests/Drupal/KernelTests/AssertLegacyTrait.php

in drupal:9.2.0 and is removed from drupal:10.0.0. Use dump() instead.

function 1
AssertMailTrait::verboseEmail core/lib/Drupal/Core/Test/AssertMailTrait.php

in drupal:9.2.0 and is removed from drupal:10.0.0. Use dump() instead.

function
BrowserTestBase::drupalGetHeader core/tests/Drupal/Tests/BrowserTestBase.php

in drupal:9.2.0 and is removed from drupal:10.0.0. Use $this->getSession()->getResponseHeader() instead.

function 1
Bytes::toInt core/lib/Drupal/Component/Utility/Bytes.php

in drupal:9.1.0 and is removed from drupal:10.0.0. Use \Drupal\Component\Utility\Bytes::toNumber() instead

function 1
Comment::prepareComment core/modules/comment/src/Plugin/migrate/source/d6/Comment.php

in drupal:9.3.0 and is removed from drupal:10.0.0. No direct replacement is provided.

function 1 1
CompiledRoute::getDefaults core/lib/Drupal/Core/Routing/CompiledRoute.php

in drupal:9.1.0 and is removed from drupal:10.0.0. No direct replacement is provided.

function
CompiledRoute::getOptions core/lib/Drupal/Core/Routing/CompiledRoute.php

in drupal:9.1.0 and is removed from drupal:10.0.0. No direct replacement is provided.

function
CompiledRoute::getRequirements core/lib/Drupal/Core/Routing/CompiledRoute.php

in drupal:9.1.0 and is removed from drupal:10.0.0. No direct replacement is provided.

function
Composer::ensureHtaccess core/lib/Drupal/Core/Composer/Composer.php

in drupal:9.5.0 and is removed from drupal:10.0.0. Any "scripts" section mentioning this in composer.json can be removed and replaced with the drupal/core-vendor-hardening Composer plugin, as needed.

function 1
Composer::removeTimeout core/lib/Drupal/Core/Composer/Composer.php

in drupal:9.5.0 and is removed from drupal:10.0.0. There is no replacement.

function 1
Composer::vendorTestCodeCleanup core/lib/Drupal/Core/Composer/Composer.php

in drupal:9.5.0 and is removed from drupal:10.0.0. Any "scripts" section mentioning this in composer.json can be removed and replaced with the drupal/core-vendor-hardening Composer plugin, as needed.

function 1
Condition::__construct core/lib/Drupal/Core/Database/Query/Condition.php

in drupal:9.1.0 and is removed from drupal:10.0.0. Creating an instance of this class is deprecated.

function
ConfigInstaller::drupalGetPath core/lib/Drupal/Core/Config/ConfigInstaller.php

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Extension\ExtensionList::getPath() instead.

function
ConfigManagerInterface::findConfigEntityDependents core/lib/Drupal/Core/Config/ConfigManagerInterface.php

in drupal:9.3.0 and is removed from drupal:10.0.0. Instead you should use ConfigManagerInterface::findConfigEntityDependencies().

function 1
ConfigManagerInterface::findConfigEntityDependentsAsEntities core/lib/Drupal/Core/Config/ConfigManagerInterface.php

in drupal:9.3.0 and is removed from drupal:10.0.0. Instead you should use ConfigManagerInterface::findConfigEntityDependenciesAsEntities().

function 1
Connection core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php

in drupal:9.4.0 and is removed from drupal:11.0.0. The SQLite database driver has been moved to the sqlite module.

class 1
Connection core/lib/Drupal/Core/Database/Driver/mysql/Connection.php

in drupal:9.4.0 and is removed from drupal:11.0.0. The MySQL database driver has been moved to the mysql module.

class 1
Connection core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php

in drupal:9.4.0 and is removed from drupal:11.0.0. The PostgreSQL database driver has been moved to the pgsql module.

class 1
Connection::destroy core/lib/Drupal/Core/Database/Connection.php

in drupal:9.1.0 and is removed from drupal:10.0.0. Move custom database destruction logic to __destruct().

function 1
Connection::$escapedNames core/lib/Drupal/Core/Database/Connection.php

in drupal:9.0.0 and is removed from drupal:10.0.0. This is no longer used. Use \Drupal\Core\Database\Connection::$escapedTables or \Drupal\Core\Database\Connection::$escapedFields instead.

property
Connection::generateTemporaryTableName core/lib/Drupal/Core/Database/Connection.php

in drupal:9.3.0 and is removed from drupal:10.0.0. There is no replacement.

function 3
Connection::handleQueryException core/lib/Drupal/Core/Database/Connection.php

in drupal:9.2.0 and is removed from drupal:10.0.0. Get a handler through $this->exceptionHandler() instead, and use one of its methods.

function 3 2
Connection::prepare core/lib/Drupal/Core/Database/Connection.php

in drupal:9.1.0 and is removed from drupal:10.0.0. Database drivers should instantiate \PDOStatement objects by calling \PDO::prepare in their Connection::prepareStatement method instead. \PDO::prepare should not be called outside of driver code.

function 1
Connection::prepareQuery core/lib/Drupal/Core/Database/Connection.php

in drupal:9.1.0 and is removed from drupal:10.0.0. Use ::prepareStatement instead.

function
Connection::$statementClass core/lib/Drupal/Core/Database/Connection.php

in drupal:9.1.0 and is removed from drupal:10.0.0. Database drivers should use or extend StatementWrapper instead, and encapsulate client-level statement objects.

property 4
Connection::supportsTransactions core/lib/Drupal/Core/Database/Connection.php

in drupal:9.1.0 and is removed from drupal:10.0.0. All database drivers must support transactions.

function
Connection::$temporaryNameIndex core/lib/Drupal/Core/Database/Connection.php

in drupal:9.3.0 and is removed from drupal:10.0.0. There is no replacement.

property
ContainerInterface::generateServiceIdHash core/lib/Drupal/Component/DependencyInjection/ContainerInterface.php

in drupal:9.5.1 and is removed from drupal:11.0.0. Use the 'Drupal\Component\DependencyInjection\ReverseContainer' service instead.

function
ContainerInterface::getServiceIdMappings core/lib/Drupal/Component/DependencyInjection/ContainerInterface.php

in drupal:9.5.1 and is removed from drupal:11.0.0. Use the 'Drupal\Component\DependencyInjection\ReverseContainer' service instead.

function
ContextAwarePluginBase core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php

in drupal:9.1.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Plugin\ContextAwarePluginTrait instead.

class 1
ContextAwarePluginBase core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php

in drupal:9.1.0 and is removed from drupal:10.0.0 without replacement.

class 1 1
Database::getDatabaseDriverNamespace core/lib/Drupal/Core/Database/Database.php

in drupal:9.1.0 and is removed from drupal:10.0.0. There is no replacement as $connection_info['namespace'] is always set.

function
Database::RETURN_AFFECTED core/lib/Drupal/Core/Database/Database.php

in drupal:9.4.0 and is removed from drupal:11.0.0. There is no replacement.

constant 10
Database::RETURN_INSERT_ID core/lib/Drupal/Core/Database/Database.php

in drupal:9.4.0 and is removed from drupal:11.0.0. There is no replacement.

constant 4
Database::RETURN_NULL core/lib/Drupal/Core/Database/Database.php

in drupal:9.4.0 and is removed from drupal:11.0.0. There is no replacement.

constant 1
Database::RETURN_STATEMENT core/lib/Drupal/Core/Database/Database.php

in drupal:9.4.0 and is removed from drupal:11.0.0. There is no replacement.

constant 2
DatabaseCacheTagsChecksum::catchException core/lib/Drupal/Core/Cache/DatabaseCacheTagsChecksum.php

in drupal:9.3.0 and is removed from drupal:10.0.0. There is no replacement.

function
Date::processDate core/lib/Drupal/Core/Render/Element/Date.php

in drupal:9.4.0 and is removed from drupal:10.0.0. There is no replacement.

function 1
debug core/includes/common.inc

in drupal:9.2.0 and is removed from drupal:10.0.0. Use dump() instead.

function 1
Delete core/lib/Drupal/Core/Database/Driver/pgsql/Delete.php

in drupal:9.4.0 and is removed from drupal:11.0.0. The PostgreSQL database driver has been moved to the pgsql module.

class 1
DependencySerializationTraitPass core/lib/Drupal/Core/DependencyInjection/Compiler/DependencySerializationTraitPass.php

in drupal:9.5.0 and is removed from drupal:11.0.0. The _serviceId property is no longer part of the container. Use \Drupal\Core\DrupalKernelInterface::getServiceIdMapping() instead.

class
deprecation_test_function core/modules/system/tests/modules/deprecation_test/deprecation_test.module

in drupal:8.4.0 and is removed from drupal:9.0.0. This is the deprecation message for deprecated_test_function().

function 4
Drupal::MINIMUM_SUPPORTED_PHP core/lib/Drupal.php

in drupal:9.4.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Utility\PhpRequirements::getMinimumSupportedPhp() instead.

constant
DrupalKernel::collectServiceIdMapping core/lib/Drupal/Core/DrupalKernel.php

in drupal:9.5.1 and is removed from drupal:11.0.0. Use the 'Drupal\Component\DependencyInjection\ReverseContainer' service instead.

function 1
DrupalKernel::generateServiceIdHash core/lib/Drupal/Core/DrupalKernel.php

in drupal:9.5.1 and is removed from drupal:11.0.0. Use the 'Drupal\Component\DependencyInjection\ReverseContainer' service instead.

function

Other projects


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.