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
$config_directories core/globals.api.php global in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Site\Settings::get('config_sync_directory') instead.
AccessResult::cacheUntilConfigurationChanges core/lib/Drupal/Core/Access/AccessResult.php function in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Access\AccessResult::addCacheableDependency() instead.
AccessResult::cacheUntilEntityChanges core/lib/Drupal/Core/Access/AccessResult.php function in drupal:8.0.0 and is removed from drupal:9.0.0. Use ::addCacheableDependency() instead.
AccountInterface::getUsername core/lib/Drupal/Core/Session/AccountInterface.php function in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Session\AccountInterface::getAccountName() or \Drupal\user\UserInterface::getDisplayName() instead. 3
AccountProxy::$initialAccountId core/lib/Drupal/Core/Session/AccountProxy.php property in drupal:8.3.0 and is removed from drupal:9.0.0. Use $this->id instead.
ActionAddForm core/modules/action/src/ActionAddForm.php class in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\action\Form\ActionEditForm instead.
ActionEditForm core/modules/action/src/ActionEditForm.php class in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\action\Form\ActionEditForm instead.
ActionFormBase core/modules/action/src/ActionFormBase.php class in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\action\Form\ActionFormBase instead.
ActionResourceTestBase core/modules/rest/tests/src/Functional/EntityResource/Action/ActionResourceTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\system\Functional\Rest\ActionResourceTestBase instead.
ActiveTheme::$baseThemes core/lib/Drupal/Core/Theme/ActiveTheme.php property in drupal:8.7.0 and is removed from drupal:9.0.0. Use $this->baseThemeExtensions instead.
ActiveTheme::getBaseThemes core/lib/Drupal/Core/Theme/ActiveTheme.php function in drupal:8.7.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Theme\ActiveTheme::getBaseThemeExtensions() instead.
AggregatorTestBase core/modules/aggregator/src/Tests/AggregatorTestBase.php class in drupal:8.?.? and is removed from drupal:9.0.0. Use \Drupal\Tests\aggregator\Functional\AggregatorTestBase instead.
AGGREGATOR_CLEAR_NEVER core/modules/aggregator/aggregator.module constant in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\aggregator\FeedStorageInterface::CLEAR_NEVER instead.
AjaxRenderer::drupalRenderRoot core/lib/Drupal/Core/Render/MainContent/AjaxRenderer.php function in drupal:8.7.0 and is removed from drupal:9.0.0. Use $this->renderer->renderRoot() instead.
AliasManager core/lib/Drupal/Core/Path/AliasManager.php class in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\path_alias\AliasManager instead. 2 5
AliasManagerInterface core/lib/Drupal/Core/Path/AliasManagerInterface.php interface in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\path_alias\AliasManagerInterface. 4 9
AliasRepository core/lib/Drupal/Core/Path/AliasRepository.php class in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\path_alias\AliasRepository instead. 1 2
AliasRepositoryInterface core/lib/Drupal/Core/Path/AliasRepositoryInterface.php interface in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\path_alias\AliasRepositoryInterface. 2 1
AliasStorage core/lib/Drupal/Core/Path/AliasStorage.php class \Drupal\Core\Path\AliasStorage is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use the "path_alias.repository" service instead, or the entity storage handler for the "path_alias" entity type for CRUD methods.
AliasStorageInterface core/lib/Drupal/Core/Path/AliasStorageInterface.php interface \Drupal\Core\Path\AliasStorage is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use the "path_alias.repository" service instead, or the entity storage handler for the "path_alias" entity type for CRUD methods. 1
AliasWhitelist core/lib/Drupal/Core/Path/AliasWhitelist.php class in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\path_alias\AliasWhitelist instead. 1 3
AliasWhitelistInterface core/lib/Drupal/Core/Path/AliasWhitelistInterface.php interface in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\path_alias\AliasWhitelistInterface. 2 1
AllowedTagsXssTrait core/lib/Drupal/Core/Field/AllowedTagsXssTrait.php trait in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Field\FieldFilteredMarkup instead. 8
Apcu4Backend core/lib/Drupal/Core/Cache/Apcu4Backend.php class in drupal:8.8.0 and is removed from from drupal:9.0.0. Use \Drupal\Core\Cache\ApcuBackend instead.
archiver_get_archiver core/includes/common.inc function in drupal:8.8.0 and is removed from drupal:9.0.0. Instead, get plugin.manager.archiver service from container and call getInstance() method on it. For example $archiver->getInstance(['filepath' => $file]); 1
archiver_get_extensions core/includes/common.inc function in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Archiver\ArchiverManager::getExtensions() instead. 1
AssertBreadcrumbTrait core/modules/system/src/Tests/Menu/AssertBreadcrumbTrait.php trait in drupal:8.?.? and is removed from drupal:9.0.0. Use \Drupal\Tests\system\Functional\Menu\AssertBreadcrumbTrait instead.
AssertButtonsTrait core/modules/node/src/Tests/AssertButtonsTrait.php trait in drupal:8.?.? and is removed from drupal:9.0.0. Use \Drupal\Tests\node\Functional\AssertButtonsTrait instead.
AssertConfigEntityImportTrait core/modules/config/src/Tests/AssertConfigEntityImportTrait.php trait in drupal:8.4.1 and is removed from drupal:9.0.0. Use \Drupal\Tests\config\Traits\AssertConfigEntityImportTrait.
AssertContentTrait core/modules/simpletest/src/AssertContentTrait.php trait in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\KernelTests\AssertContentTrait instead.
AssertHelperTrait core/modules/simpletest/src/AssertHelperTrait.php trait in drupal:8.4.0 and is removed from drupal:9.0.0. Use Drupal\Tests\AssertHelperTrait instead.
AssertMenuActiveTrailTrait core/modules/system/src/Tests/Menu/AssertMenuActiveTrailTrait.php trait in drupal:8.?.? and is removed from drupal:9.0.0. Use \Drupal\Tests\system\Functional\Menu\AssertMenuActiveTrailTrait instead.
AssertPageCacheContextsAndTagsTrait core/modules/system/src/Tests/Cache/AssertPageCacheContextsAndTagsTrait.php trait in drupal:8.?.? and is removed from drupal:9.0.0. Use \Drupal\Tests\system\Functional\Cache\AssertPageCacheContextsAndTagsTrait instead. 2
BaseFieldDefinition::getFieldItemClass core/lib/Drupal/Core/Field/BaseFieldDefinition.php function in drupal:8.5.0 and is removed from drupal:9.0.0. Use \Drupal\Core\TypedData\ListDataDefinition::getClass() instead.
BaseFieldDefinition::setQueryable core/lib/Drupal/Core/Field/BaseFieldDefinition.php function in drupal:8.4.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Field\BaseFieldDefinition::setCustomStorage() instead.
BaseFieldOverrideResourceTestBase core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideResourceTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\FunctionalTests\Rest\BaseFieldOverrideResourceTestBase instead.
BasicAuthTestTrait core/modules/basic_auth/src/Tests/BasicAuthTestTrait.php trait in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\Tests\basic_auth\Traits\BasicAuthTestTrait instead.
Block::$context core/lib/Drupal/Core/Block/Annotation/Block.php property Providing context definitions via the "context" key is deprecated in Drupal 8.7.x and will be removed before Drupal 9.0.0. Use the "context_definitions" key instead.
BlockContentInterface::getRevisionLog core/modules/block_content/src/BlockContentInterface.php function in drupal:8.2.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Entity\RevisionLogInterface::getRevisionLogMessage() instead. 1
BlockContentInterface::setRevisionLog core/modules/block_content/src/BlockContentInterface.php function in drupal:8.2.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Entity\RevisionLogInterface::setRevisionLogMessage() instead. 1
BlockContentResourceTestBase core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentResourceTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\block_content\Functional\Rest\BlockContentResourceTestBase instead.
BlockContentTestBase core/modules/block_content/src/Tests/BlockContentTestBase.php class in drupal:8.?.? and is removed from drupal:9.0.0. Use \Drupal\Tests\block_content\Functional\BlockContentTestBase instead.
BlockContentTestBase core/modules/block_content/src/Tests/Views/BlockContentTestBase.php class in drupal:8.4.0 and is removed from drupal:9.0.0. Use \Drupal\Tests\block_content\Functional\Views\BlockContentTestBase.
BlockContentTypeResourceTestBase core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeResourceTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\block_content\Functional\Rest\BlockContentTypeResourceTestBase instead.
BlockCreationTrait core/modules/simpletest/src/BlockCreationTrait.php trait in drupal:8.4.0 and is removed from drupal:9.0.0. Use \Drupal\Tests\block\Traits\BlockCreationTrait instead.
BlockInterface::BLOCK_LABEL_VISIBLE core/modules/block/src/BlockInterface.php constant in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Block\BlockPluginInterface::BLOCK_LABEL_VISIBLE.
BlockInterface::BLOCK_REGION_NONE core/modules/block/src/BlockInterface.php constant in drupal:8.?.? and is removed from drupal:9.0.0.
BlockPluginId::$migrationPlugin core/modules/block/src/Plugin/migrate/process/BlockPluginId.php property in drupal:8.8.x and is removed from drupal:9.0.0. Use the migrate.lookup service instead.
BlockResourceTestBase core/modules/rest/tests/src/Functional/EntityResource/Block/BlockResourceTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\block\Functional\Rest\BlockResourceTestBase instead.
BlockTestBase core/modules/block/src/Tests/BlockTestBase.php class in drupal:8.5.0 and is removed from drupal:9.0.0. Use \Drupal\Tests\block\Functional\BlockTestBase.

Pages

Other projects