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
ModuleVersion core/modules/update/src/ModuleVersion.php

in drupal:9.2.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Extension\ExtensionVersion instead. As an internal class ExtensionVersion may also be removed in a minor release.

class 1
module_load_include core/includes/module.inc

in drupal:9.4.0 and is removed from drupal:11.0.0. Use \Drupal::moduleHandler()->loadInclude($module, $type, $name = NULL). Note that including code from uninstalled extensions is no longer supported.

function 1
module_load_install core/includes/module.inc

in drupal:9.4.0 and is removed from drupal:10.0.0. Use \Drupal::moduleHandler()->loadInclude($module, 'install') instead. Note, the replacement no longer allows including code from uninstalled modules.

function 2
NodeAddAccessCheck core/modules/node/src/Access/NodeAddAccessCheck.php

in drupal:9.3.0 and is removed from drupal:10.0.0. Use _entity_create_access or _entity_create_any_access access checks instead.

class
NodeReference core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php

in drupal:9.1.0 and is removed from drupal:10.0.0. Use \Drupal\migrate_drupal\Plugin\migrate\field\d6\NodeReference instead.

class 1
NodeType core/modules/node/src/Plugin/Condition/NodeType.php

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Entity\Plugin\Condition\EntityBundle instead.

class
PagerSelectExtender::$maxElement core/lib/Drupal/Core/Database/Query/PagerSelectExtender.php

in drupal:9.2.0 and is removed from drupal:10.0.0. Use \Drupal::service('pager.manager')->getMaxPagerElementId() instead.

property
PharExtensionInterceptor core/lib/Drupal/Core/Security/PharExtensionInterceptor.php

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

class 1
PREG_CLASS_CJK core/modules/search/search.module

in drupal:9.1.0 and is removed from drupal:10.0.0. Use \Drupal\search\SearchTextProcessorInterface::PREG_CLASS_CJK instead.

constant 1
PREG_CLASS_NUMBERS core/modules/search/search.module

in drupal:9.1.0 and is removed from drupal:10.0.0. Use \Drupal\search\SearchTextProcessorInterface::PREG_CLASS_NUMBERS instead.

constant
PREG_CLASS_PUNCTUATION core/modules/search/search.module

in drupal:9.1.0 and is removed from drupal:10.0.0. Use \Drupal\search\SearchTextProcessorInterface::PREG_CLASS_PUNCTUATION instead.

constant
Registry::getPath core/lib/Drupal/Core/Theme/Registry.php

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

function
render core/includes/common.inc

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Render\RendererInterface::render() instead.

function 1
RequestSanitizer::SANITIZE_WHITELIST core/lib/Drupal/Core/Security/RequestSanitizer.php

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

constant
REQUEST_TIME core/includes/bootstrap.inc

in drupal:8.3.0 and is removed from drupal:11.0.0. Use \Drupal::time()->getRequestTime();

constant 116
RouteProvider::getRoutesCount core/lib/Drupal/Core/Routing/RouteProvider.php

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

function
RouteProvider::getRoutesPaged core/lib/Drupal/Core/Routing/RouteProvider.php

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

function
RouteProviderLazyBuilder::getRoutesCount core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php

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

function
RouteProviderLazyBuilder::getRoutesPaged core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php

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

function
Schema core/lib/Drupal/Core/Database/Driver/sqlite/Schema.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
Schema core/lib/Drupal/Core/Database/Driver/mysql/Schema.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
Schema core/lib/Drupal/Core/Database/Driver/pgsql/Schema.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
SCHEMA_UNINSTALLED core/includes/schema.inc

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Update\UpdateHookRegistry::SCHEMA_UNINSTALLED constant instead.

constant
search_expand_cjk core/modules/search/search.module

in drupal:9.1.0 and is removed from drupal:10.0.0. Use a custom implementation of SearchTextProcessorInterface instead.

function 1
search_index_split core/modules/search/search.module

in drupal:9.1.0 and is removed from drupal:10.0.0. Use a \Drupal\search\SearchTextProcessorInterface::process() instead.

function 1
search_invoke_preprocess core/modules/search/search.module

in drupal:9.1.0 and is removed from drupal:10.0.0. Use a custom implementation of SearchTextProcessor instead.

function 1
search_simplify core/modules/search/search.module

in drupal:9.1.0 and is removed from drupal:10.0.0. Use \Drupal\search\SearchTextProcessorInterface::analyze() instead.

function 1
SectionStorageTestBase core/modules/layout_builder/tests/src/Kernel/SectionStorageTestBase.php

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Tests\layout_builder\Kernel\SectionListTestBase instead.

class
SectionStorageTrait core/modules/layout_builder/src/SectionStorage/SectionStorageTrait.php

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\layout_builder\SectionListTrait instead.

trait
Select core/lib/Drupal/Core/Database/Driver/sqlite/Select.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
Select core/lib/Drupal/Core/Database/Driver/pgsql/Select.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
ServiceIdHashTrait core/lib/Drupal/Component/DependencyInjection/ServiceIdHashTrait.php

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

trait 1
Sql::getMigrationPluginManager core/modules/migrate/src/Plugin/migrate/id_map/Sql.php

in drupal:9.5.0 and is removed from drupal:11.0.0. Use $this->migrationPluginManager instead.

function 1 1
Statement core/lib/Drupal/Core/Database/Driver/sqlite/Statement.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
Statement core/lib/Drupal/Core/Database/Statement.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.

class 1
StatementEmpty core/lib/Drupal/Core/Database/StatementEmpty.php

in drupal:9.2.0 and is removed from drupal:10.0.0. There is no replacement. Use mocked StatementInterface classes in tests if needed.

class 1
StatementWrapper::bindColumn core/lib/Drupal/Core/Database/StatementWrapper.php

in drupal:9.1.0 and is removed from drupal:10.0.0. StatementWrapper::bindColumn should not be called. Access the client-level statement object via ::getClientStatement().

function
StatementWrapper::bindParam core/lib/Drupal/Core/Database/StatementWrapper.php

in drupal:9.1.0 and is removed from drupal:10.0.0. StatementWrapper::bindParam should not be called. Access the client-level statement object via ::getClientStatement().

function
StatementWrapper::__call core/lib/Drupal/Core/Database/StatementWrapper.php

in drupal:9.1.0 and is removed from drupal:10.0.0. Access the client-level statement object via ::getClientStatement().

function
StylePluginBase::wizardForm core/modules/views/src/Plugin/views/style/StylePluginBase.php

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

function
system_sort_modules_by_info_name core/modules/system/system.module

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

function
Tasks core/lib/Drupal/Core/Database/Driver/sqlite/Install/Tasks.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
Tasks core/lib/Drupal/Core/Database/Driver/mysql/Install/Tasks.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
Tasks core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.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
TaxonomyController::vocabularyTitle core/modules/taxonomy/src/Controller/TaxonomyController.php

in drupal:9.3.0 and is removed from drupal:10.0.0. There is no replacement; route title callbacks are internal.

function
taxonomy_implode_tags core/modules/taxonomy/taxonomy.module

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Entity\Element\EntityAutocomplete::getEntityLabels() instead.

function 1
taxonomy_terms_static_reset core/modules/taxonomy/taxonomy.module

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal::entityTypeManager()->getStorage('taxonomy_term')->resetCache() instead.

function 1
taxonomy_term_load_multiple_by_name core/modules/taxonomy/taxonomy.module

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadByProperties(['name' => $name, 'vid' => $vid]) instead, to get a list of taxonomy term entities having the same name and keyed by their term ID.

function 1
taxonomy_term_title core/modules/taxonomy/taxonomy.module

in drupal:9.3.0 and is removed from drupal:10.0.0. Use $term->label() instead.

function 1
taxonomy_term_uri core/modules/taxonomy/taxonomy.module

in drupal:9.3.0 and is removed from drupal:10.0.0. Use $term->toUrl() instead.

function 1

Other projects


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