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
DrupalKernel::$serviceIdMapping 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.

property
DrupalKernelInterface::getServiceIdMapping core/lib/Drupal/Core/DrupalKernelInterface.php

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

function 1
drupal_get_filename core/includes/bootstrap.inc

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

function 2
drupal_get_installed_schema_version core/includes/schema.inc

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Update\UpdateHookRegistry::getInstalledVersion() or \Drupal\Core\Update\UpdateHookRegistry::getAllInstalledVersions() instead.

function 1
drupal_get_module_schema core/includes/schema.inc

in drupal:9.2.0 and is removed from drupal:10.0.0. No direct replacement is provided. Testing classes could use \Drupal\TestTools\Extension\SchemaInspector for introspection.

function 3
drupal_get_path core/includes/bootstrap.inc

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

function 1
drupal_get_schema_versions core/includes/schema.inc

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Update\SchemaDataInterface::getAvailableUpdates() instead.

function 1
drupal_install_schema core/includes/schema.inc

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

function 1
drupal_js_defaults core/includes/common.inc

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

function 1
DRUPAL_MINIMUM_PHP core/includes/bootstrap.inc

in drupal:9.1.0 and is removed from drupal:10.0.0. Use \Drupal::MINIMUM_PHP instead.

constant 1
DRUPAL_MINIMUM_PHP_MEMORY_LIMIT core/includes/bootstrap.inc

in drupal:9.1.0 and is removed from drupal:10.0.0. Use \Drupal::MINIMUM_PHP_MEMORY_LIMIT instead.

constant
DRUPAL_MINIMUM_SUPPORTED_PHP core/includes/bootstrap.inc

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

constant
DRUPAL_RECOMMENDED_PHP core/includes/bootstrap.inc

in drupal:9.1.0 and is removed from drupal:10.0.0. Use \Drupal::RECOMMENDED_PHP instead.

constant
drupal_required_modules core/includes/module.inc

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

function 1
drupal_set_installed_schema_version core/includes/schema.inc

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Update\UpdateHookRegistry::setInstalledVersion() instead.

function 1
drupal_uninstall_schema core/includes/schema.inc

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

function 1
Editor core/modules/editor/src/Plugin/InPlaceEditor/Editor.php

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

class
EntityTypeInterface::isSubclassOf core/lib/Drupal/Core/Entity/EntityTypeInterface.php

in drupal:8.3.0 and is removed from drupal:10.0.0. Use Drupal\Core\Entity\EntityTypeInterface::entityClassImplements() instead.

function 1
ExceptionHandler core/lib/Drupal/Core/Database/Driver/mysql/ExceptionHandler.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
ExpectDeprecationTrait core/tests/Drupal/Tests/Traits/ExpectDeprecationTrait.php

in drupal:9.1.0 and is removed from drupal:10.0.0. Use \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait instead.

trait 2
FieldUiRouteEnhancer core/modules/field_ui/src/Routing/FieldUiRouteEnhancer.php

in drupal:9.4.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Entity\Enhancer\EntityBundleRouteEnhancer.

class 1
file_build_uri core/includes/file.inc

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

function 1
file_copy core/modules/file/file.module

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\file\FileRepositoryInterface::copy() instead.

function 1
file_create_url core/includes/file.inc

in drupal:9.3.0 and is removed from drupal:10.0.0. Use the appropriate method on \Drupal\Core\File\FileUrlGeneratorInterface instead.

function 1
FILE_INSECURE_EXTENSION_REGEX core/modules/file/file.module

in drupal:9.2.0 and is removed from drupal:10.0.0. Use \Drupal\Core\File\FileSystemInterface::INSECURE_EXTENSION_REGEX.

constant
file_move core/modules/file/file.module

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\file\FileRepositoryInterface::move() instead.

function 1
file_munge_filename core/includes/file.inc

in drupal:9.2.0 and is removed from drupal:10.0.0. Dispatch a \Drupal\Core\File\Event\FileUploadSanitizeNameEvent event instead.

function 6
file_save_data core/modules/file/file.module

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\file\FileRepositoryInterface::writeData() instead.

function 1
FILE_STATUS_PERMANENT core/includes/file.inc

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\file\FileInterface::STATUS_PERMANENT or \Drupal\file\FileInterface::setPermanent() instead.

constant
file_unmunge_filename core/includes/file.inc

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

function 1
file_url_transform_relative core/includes/file.inc

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\File\FileUrlGenerator::transformRelative() instead.

function 1
GetUntransformedTextCommand core/modules/editor/src/Ajax/GetUntransformedTextCommand.php

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

class 1
hook_field_widget_form_alter core/modules/field/field.api.php

in drupal:9.2.0 and is removed from drupal:10.0.0. Use hook_field_widget_single_element_form_alter instead.

function
hook_field_widget_multivalue_form_alter core/modules/field/field.api.php

in drupal:9.2.0 and is removed from drupal:10.0.0. Use hook_field_widget_complete_form_alter instead.

function
hook_field_widget_multivalue_WIDGET_TYPE_form_alter core/modules/field/field.api.php

in drupal:9.2.0 and is removed from drupal:10.0.0. Use hook_field_widget_complete_WIDGET_TYPE_form_alter instead.

function
hook_field_widget_WIDGET_TYPE_form_alter core/modules/field/field.api.php

in drupal:9.2.0 and is removed from drupal:10.0.0. Use hook_field_widget_single_element_WIDGET_TYPE_form_alter instead.

function
Image core/modules/image/src/Plugin/InPlaceEditor/Image.php

in drupal:9.4.0 and is removed from drupal:10.0.0. Use the Drupal\quickedit\Plugin\InPlaceEditor\Image in-place editor instead.

class
Insert core/lib/Drupal/Core/Database/Driver/sqlite/Insert.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
Insert core/lib/Drupal/Core/Database/Driver/mysql/Insert.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
Insert core/lib/Drupal/Core/Database/Driver/pgsql/Insert.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
LayoutBuilderContextTrait::getAvailableContexts core/modules/layout_builder/src/Context/LayoutBuilderContextTrait.php

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\layout_builder\Context\LayoutBuilderContextTrait::getPopulatedContexts() instead.

function
LibraryDiscoveryParser::drupalGetPath core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php

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

function
Mail::formatDisplayName core/lib/Drupal/Component/Utility/Mail.php

in drupal:9.2.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Mime\Header\MailboxHeader instead.

function 1
MaintenanceModeSubscriber::onKernelRequestMaintenance core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php

in drupal:9.4.0 and is removed from drupal:10.0.0. Use \Drupal\user\EventSubscriber::onMaintenanceModeRequest() instead.

function
menu_list_system_menus core/includes/menu.inc

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\system\Entity\Menu::loadMultiple() instead.

function 2
menu_ui_get_menus core/modules/menu_ui/menu_ui.module

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\system\Entity\Menu::loadMultiple() instead.

function 1
MimeTypeGuesser::addGuesser core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php

in drupal:9.1.0 and is removed from drupal:10.0.0. Use ::addMimeTypeGuesser() instead.

function
MimeTypePass core/lib/Drupal/Core/DependencyInjection/Compiler/MimeTypePass.php

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

class 2
ModuleHandlerInterface::getImplementations core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php

in drupal:9.4.0 and is removed from drupal:10.0.0. Instead you should use ModuleHandlerInterface::invokeAllWith() for hook invocations or you should use ModuleHandlerInterface::hasImplementations() to determine if hooks implementations exist.

function 1
ModuleHandlerInterface::implementsHook core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php

in drupal:9.4.0 and is removed from drupal:10.0.0. Use the hasImplementations() methods instead with the $modules argument.

function 1

Other projects


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