You are here

Deprecated in Drupal 8

Primary tabs

Examples: "before Drupal 9", "in Drupal 8.4"
Namesort descending Location Type Deprecation Direct uses Namespaced uses Overrides Use statements
InstallerTestBase core/modules/simpletest/src/InstallerTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use \Drupal\FunctionalTests\Installer\InstallerTestBase. See https://www.drupal.org/node/2988752 1 1
InstallProfileMismatchException::__construct core/lib/Drupal/Core/Installer/Exception/InstallProfileMismatchException.php function in drupal:8.3.0 and is removed from drupal:9.0.0. The install profile is written to core.extension.
install_ensure_config_directory core/includes/install.inc function in drupal:8.1.0 and is removed from drupal:9.0.0. Use config_get_config_directory() and \Drupal\Core\File\FileSystemInterface::prepareDirectory() instead.
install_write_profile core/includes/install.core.inc function in drupal:8.3.0 and is removed from drupal:9.0.0. The install profile is written to core.extension.
InternalUri core/modules/menu_link_content/src/Plugin/migrate/process/d7/InternalUri.php class in drupal:8.2.0 and is removed from drupal:9.0.0. Use \Drupal\menu_link_content\Plugin\migrate\process\LinkUri instead.
ItemHalJsonTestBase core/modules/hal/tests/src/Functional/EntityResource/Item/ItemHalJsonTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\aggregator\Functional\Hal\ItemHalJsonTestBase instead.
ItemResourceTestBase core/modules/rest/tests/src/Functional/EntityResource/Item/ItemResourceTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\aggregator\Functional\Rest\ItemResourceTestBase instead.
Iterator core/modules/migrate/src/Plugin/migrate/process/Iterator.php class in drupal:8.4.0 and is removed from drupal:9.0.0. Use \Drupal\migrate\Plugin\migrate\process\SubProcess instead. 1
JavascriptTestBase core/tests/Drupal/FunctionalJavascriptTests/JavascriptTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use \Drupal\FunctionalJavascriptTests\WebDriverTestBase instead 1
KernelTestBase core/modules/simpletest/src/KernelTestBase.php class in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\KernelTests\KernelTestBase instead. 4 4
KernelTestBase::isTestInIsolation core/tests/Drupal/KernelTests/KernelTestBase.php function in drupal:8.4.0 and is removed from drupal:9.0.0. KernelTestBase tests are always run in isolated processes.
KernelTestBase::__get core/tests/Drupal/KernelTests/KernelTestBase.php function in drupal:8.0.0 and is removed from drupal:9.0.0.
LanguageConfigFactoryOverrideInterface::setLanguageFromDefault core/modules/language/src/Config/LanguageConfigFactoryOverrideInterface.php function in drupal:8.3.0 and is removed from drupal:9.0.0. This method has been replaced by injecting the default language into the constructor.
language_negotiation_url_domains core/modules/language/language.module function in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal::config('language.negotiation')->get('url.domains') instead.
language_negotiation_url_prefixes core/modules/language/language.module function in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal::config('language.negotiation')->get('url.prefixes') instead.
LayoutBuilderEntityViewDisplay::getRuntimeSections core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php function in drupal:8.7.0 and is removed from drupal:9.0.0. \Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface::findByContext() should be used instead. See https://www.drupal.org/node/3022574.
LayoutEntityHelperTrait::isEntityUsingFieldOverride core/modules/layout_builder/src/LayoutEntityHelperTrait.php function in drupal:8.7.0 and is removed from drupal:9.0.0. To determine if an entity has a layout override, use \Drupal\layout_builder\LayoutEntityHelperTrait::getSectionStorageForEntity() and check whether the result is an instance of \Drupal\layout_builder\DefaultsSectionStorageInterface.
LegacyJavascriptTestBase core/tests/Drupal/FunctionalJavascriptTests/LegacyJavascriptTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use \Drupal\FunctionalJavascriptTests\WebDriverTestBase instead BC layer for testing browser interaction implemented in JavaScript.
LegacyMessenger core/lib/Drupal/Core/Messenger/LegacyMessenger.php class in drupal:8.5.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Messenger\Messenger instead. 2
LibraryDiscoveryParser::fileValidUri core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php function in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::isValidUri() instead. 1
LinkField core/modules/link/src/Plugin/migrate/cckfield/LinkField.php class in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\link\Plugin\migrate\field\d6\LinkField instead. 1 2
LinkField core/modules/link/src/Plugin/migrate/cckfield/d7/LinkField.php class in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\link\Plugin\migrate\field\d7\LinkField instead. 1
LinkGeneratorTrait core/lib/Drupal/Core/Routing/LinkGeneratorTrait.php trait in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Link instead. 2
LinkGeneratorTrait::getLinkGenerator core/lib/Drupal/Core/Routing/LinkGeneratorTrait.php function in drupal:8.0.0 and is removed from drupal:9.0.0. Inject the 'link_generator' service or use \Drupal\Core\Link instead
LinkGeneratorTrait::l core/lib/Drupal/Core/Routing/LinkGeneratorTrait.php function in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Link::fromTextAndUrl() instead.
LinkGeneratorTrait::setLinkGenerator core/lib/Drupal/Core/Routing/LinkGeneratorTrait.php function in drupal:8.0.0 and is removed from drupal:9.0.0. Inject the 'link_generator' service or use \Drupal\Core\Link instead
LinkManager core/modules/rest/src/LinkManager/LinkManager.php class in drupal:8.3.0 and is removed from drupal:9.0.0. This has been moved to the hal module. This exists solely for BC. 1
LinkManagerBase core/modules/rest/src/LinkManager/LinkManagerBase.php class in drupal:8.3.0 and is removed from drupal:9.0.0. This has been moved to the hal module. This exists solely for BC.
LinkManagerInterface core/modules/rest/src/LinkManager/LinkManagerInterface.php interface in drupal:8.3.0 and is removed from drupal:9.0.0. This has been moved to the hal module. This exists solely for BC. 1
LinkUri core/modules/menu_link_content/src/Plugin/migrate/process/d6/LinkUri.php class in drupal:8.2.0 and is removed from drupal:9.0.0. Use \Drupal\menu_link_content\Plugin\migrate\process\LinkUri instead.
LocalActionManager::$controllerResolver core/lib/Drupal/Core/Menu/LocalActionManager.php property Using the 'controller_resolver' service as the first argument is deprecated, use the 'http_kernel.controller.argument_resolver' instead. If your subclass requires the 'controller_resolver' service add it as an additional argument.
LOCALE_PLURAL_DELIMITER core/includes/common.inc constant in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Component\Gettext\PoItem::DELIMITER instead.
locale_translation_manual_status core/modules/locale/locale.pages.inc function in drupal:8.5.0 and is removed from drupal:9.0.0. It is unused by Drupal core. Duplicate this function in your own extension if you need its behavior.
LocalTaskManager::$controllerResolver core/lib/Drupal/Core/Menu/LocalTaskManager.php property Using the 'controller_resolver' service as the first argument is deprecated, use the 'http_kernel.controller.argument_resolver' instead. If your subclass requires the 'controller_resolver' service add it as an additional argument.
Media::getCurrentUserId core/modules/media/src/Entity/Media.php function The ::getCurrentUserId method is deprecated in 8.6.x and will be removed before 9.0.0. 1
MediaDeleteMultipleConfirmForm core/modules/media/src/Form/MediaDeleteMultipleConfirmForm.php class in drupal:8.6.0 and is removed from drupal:9.0.0. This route is not used in Drupal core. As an internal API, it may also be removed in a minor release. If you are using it, copy the class and the related "entity.media.multiple_delete_confirm" route to your module.
MediaFunctionalTestCreateMediaTypeTrait core/modules/media/tests/src/Functional/MediaFunctionalTestCreateMediaTypeTrait.php trait in drupal:8.6.0 and is removed from drupal:9.0.0. Use \Drupal\Tests\media\Traits\MediaTypeCreationTrait instead.
MediaResourceTestBase core/modules/rest/tests/src/Functional/EntityResource/Media/MediaResourceTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\media\Functional\Rest\MediaResourceTestBase instead.
MediaTypeResourceTestBase core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeResourceTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\media\Functional\Rest\MediaTypeResourceTestBase instead.
MenuLinkContentResourceTestBase core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentResourceTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\menu_link_content\Functional\Rest\MenuLinkContentResourceTestBase instead.
MenuLinkParent::$migrationPlugin core/modules/migrate/src/Plugin/migrate/process/MenuLinkParent.php property in drupal:8.8.x and is removed from drupal:9.0.0. Use the migrate.lookup service instead.
MenuResourceTestBase core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuResourceTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\system\Functional\Rest\MenuResourceTestBase instead.
MenuTestBase core/modules/system/src/Tests/Menu/MenuTestBase.php class in drupal:8.?.? and is removed from drupal:9.0.0. Use \Drupal\Tests\BrowserTestBase instead.
MenuWebTestBase core/modules/menu_ui/src/Tests/MenuWebTestBase.php class in drupal:8.5.0 and is removed from drupal:9.0.0. Use \Drupal\Tests\menu_ui\Traits\MenuUiTrait methods, instead.
menu_cache_clear_all core/includes/menu.inc function in drupal:8.6.0 and is removed from drupal:9.0.0. Use \Drupal::cache('menu')->invalidateAll() instead. 1
menu_local_tabs core/includes/menu.inc function in drupal:8.8.0 and is removed from drupal:9.0.0. Use local_tasks_block block or inline theming instead. 1
menu_local_tasks core/includes/menu.inc function in drupal:8.0.0 and is removed from drupal:9.0.0.
MENU_MAX_MENU_NAME_LENGTH_UI core/modules/menu_ui/menu_ui.module constant in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\system\MenuStorage::MAX_ID_LENGTH instead.
menu_primary_local_tasks core/includes/menu.inc function in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Menu\LocalTaskManagerInterface::getLocalTasks() instead. 2
menu_secondary_local_tasks core/includes/menu.inc function in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Menu\LocalTaskManagerInterface::getLocalTasks() instead. 2

Pages

Other projects