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
pager_default_initialize core/includes/pager.inc function in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerManagerInterface->defaultInitialize() instead. 1
pager_find_page core/includes/pager.inc function in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerParametersInterface->findPage() instead. 1
pager_get_query_parameters core/includes/pager.inc function in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerParametersInterface->getQueryParameters() instead. 1
pager_query_add_page core/includes/pager.inc function in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerManagerInterface::getUpdatedParameters() instead. 1
Path core/modules/node/src/Plugin/views/field/Path.php class in drupal:8.5.0 and is removed from drupal:9.0.0. Use @ViewsField("entity_link") with 'output_url_as_text' set.
PathProcessorAlias core/lib/Drupal/Core/PathProcessor/PathProcessorAlias.php class in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\path_alias\PathProcessor\AliasPathProcessor. 1 3
PathSubscriber core/lib/Drupal/Core/EventSubscriber/PathSubscriber.php class in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\path_alias\EventSubscriber\PathAliasSubscriber instead. 1 3
PathTestBase core/modules/path/src/Tests/PathTestBase.php class in drupal:8.?.? and is removed from drupal:9.0.0. Use \Drupal\Tests\path\Functional\PathTestBase instead.
PhpunitCompatibilityTrait::getMock core/tests/Drupal/Tests/PhpunitCompatibilityTrait.php function in drupal:8.5.0 and is removed from drupal:9.0.0. Use \Drupal\Tests\PhpunitCompatibilityTrait::createMock() instead. 1
PhpunitCompatibilityTrait::setExpectedException core/tests/Drupal/Tests/PhpunitCompatibilityTrait.php function in drupal:8.8.0 and is removed from drupal:9.0.0. Backward compatibility for PHPUnit 4 will no longer be supported. 1
PlaceBlockPageVariant core/modules/block_place/src/Plugin/DisplayVariant/PlaceBlockPageVariant.php class in drupal:8.8.0 and is removed from drupal:9.0.0. See the change record for a list of alternatives.
PluginInterface core/modules/views/src/Plugin/views/PluginInterface.php interface in drupal:8.3.0 and is removed from drupal:9.0.0.
PluginKernelTestBase core/modules/views/src/Tests/Plugin/PluginKernelTestBase.php class in drupal:8.?.? and is removed from drupal:9.0.0. Use \Drupal\Tests\views\Kernel\ViewsKernelTestBase instead.
PluginTestBase core/modules/views/src/Tests/Plugin/PluginTestBase.php class in drupal:8.4.0 and is removed from drupal:9.0.0. Use \Drupal\Tests\views\Functional\ViewTestBase.
PluralTranslatableMarkup::DELIMITER core/lib/Drupal/Core/StringTranslation/PluralTranslatableMarkup.php constant in drupal:8.7.0 and is removed from drupal:9.0.0. Use Drupal\Component\Gettext\PoItem::DELIMITER instead.
PrivateTempStore core/modules/user/src/PrivateTempStore.php class in drupal:8.5.0 and is removed from drupal:9.0.0. Use \Drupal\Core\TempStore\PrivateTempStore instead. 1
PrivateTempStoreFactory core/modules/user/src/PrivateTempStoreFactory.php class in drupal:8.5.0 and is removed from drupal:9.0.0. Use \Drupal\Core\TempStore\PrivateTempStoreFactory instead.
PublishComment core/modules/comment/src/Plugin/Action/PublishComment.php class in drupal:8.5.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Action\Plugin\Action\PublishAction instead.
PublishNode core/modules/node/src/Plugin/Action/PublishNode.php class in drupal:8.5.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Action\Plugin\Action\PublishAction instead.
QueryFactory core/lib/Drupal/Core/Entity/Query/QueryFactory.php class in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Entity\EntityStorageInterface::getQuery() or \Drupal\Core\Entity\EntityStorageInterface::getAggregateQuery() instead.
RandomGeneratorTrait core/modules/simpletest/src/RandomGeneratorTrait.php trait in drupal:8.1.1 and is removed from drupal:9.0.0. Use \Drupal\Tests\RandomGeneratorTrait instead.
RawParameterValueResolver core/lib/Drupal/Core/Controller/ArgumentResolver/RawParameterValueResolver.php class in Drupal 8.8.1 and will be removed before Drupal 9.0.0. There is no replacement. 1
RdfMappingResourceTestBase core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingResourceTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\rdf\Functional\Rest\RdfMappingResourceTestBase instead.
RelationLinkManager core/modules/rest/src/LinkManager/RelationLinkManager.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
RelationLinkManagerInterface core/modules/rest/src/LinkManager/RelationLinkManagerInterface.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
RequestHandler::getLegacyParameters core/modules/rest/src/RequestHandler.php function in drupal:8.4.0 and is removed from drupal:9.0.0. Use the argument resolver method instead, see ::createArgumentResolver(). 1
REQUEST_TIME core/includes/bootstrap.inc constant in drupal:8.3.0 and is removed from drupal:10.0.0. Use \Drupal::time()->getRequestTime(); 153
ResourcePluginManager::getInstance core/modules/rest/src/Plugin/Type/ResourcePluginManager.php function in Drupal 8.2.0. Use Drupal\rest\Plugin\Type\ResourcePluginManager::createInstance() instead.
ResourceType::updateDeprecatedFieldMapping core/modules/jsonapi/src/ResourceType/ResourceType.php function in drupal:8.8.0 and is removed from drupal:9.0.0. Use self::getFields() instead. 1
ResourceTypeRepository::getFieldMapping core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php function in drupal:8.8.0 and is removed from drupal:9.0.0. Use self::getFields() instead.
ResponsiveImageStyleResourceTestBase core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleResourceTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\responsive_image\Functional\Rest\ResponsiveImageStyleResourceTestBase instead.
responsive_image_build_source_attributes core/modules/responsive_image/responsive_image.module function in drupal:8.3.0 and is removed from drupal:9.0.0.
RESPONSIVE_IMAGE_EMPTY_IMAGE core/modules/responsive_image/responsive_image.module constant in drupal:8.3.0 and is removed from drupal:9.0.0. Use Drupal\responsive_image\ResponsiveImageStyleInterface::EMPTY_IMAGE instead.
RESPONSIVE_IMAGE_ORIGINAL_IMAGE core/modules/responsive_image/responsive_image.module constant in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\responsive_image\ResponsiveImageStyleInterface::ORIGINAL_IMAGE instead.
RestExport::$authenticationProviders core/modules/rest/src/Plugin/views/display/RestExport.php property in drupal:8.4.0 and is removed from drupal:9.0.0. see https://www.drupal.org/node/2825204.
RestResourceConfigResourceTestBase core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigResourceTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\rest\Functional\Rest\RestResourceConfigResourceTestBase instead.
RESTTestBase core/modules/rest/src/Tests/RESTTestBase.php class in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\Tests\rest\Functional\ResourceTestBase and \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase instead. Only retained for contributed module tests that may be using this base class.
RoleResourceTestBase core/modules/rest/tests/src/Functional/EntityResource/Role/RoleResourceTestBase.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\user\Functional\Rest\RoleResourceTestBase instead.
RouteEnhancerInterface core/lib/Drupal/Core/Routing/Enhancer/RouteEnhancerInterface.php interface in drupal:8.4.0 and is removed from drupal:9.0.0. Instead, you should use \Drupal\Core\Routing\EnhancerInterface. See https://www.drupal.org/node/2894934 Part of the deprecation means that applies() is now called on runtime instead of compile time. 1
RouteFilterInterface core/lib/Drupal/Core/Routing/RouteFilterInterface.php interface in drupal:8.4.0 and is removed from drupal:9.0.0. Instead, you should use \Drupal\Core\Routing\FilterInterface. See https://www.drupal.org/node/2894934
RouteProvider core/modules/simpletest/src/RouteProvider.php class in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\KernelTests\RouteProvider instead.
SafeMarkup core/lib/Drupal/Component/Utility/SafeMarkup.php class Will be removed before Drupal 9.0.0. Use the appropriate sanitization functions or the theme and render systems so that the output can can be themed, escaped, and altered properly. 1
SafeMarkup::checkPlain core/lib/Drupal/Component/Utility/SafeMarkup.php function Will be removed before Drupal 9.0.0. Rely on Twig's auto-escaping feature, or use the #plain_text key when constructing a render array that contains plain text in order to use the renderer's auto-escaping feature. If neither of these are possible, \Drupal\Component\Utility\Html::escape() can be used in places where explicit escaping is needed. 1
SafeMarkup::format core/lib/Drupal/Component/Utility/SafeMarkup.php function in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Component\Render\FormattableMarkup. 1
SafeMarkup::isSafe core/lib/Drupal/Component/Utility/SafeMarkup.php function in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, you should just check if a variable is an instance of \Drupal\Component\Render\MarkupInterface. 1
SaveComment core/modules/comment/src/Plugin/Action/SaveComment.php class in drupal:8.5.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Action\Plugin\Action\SaveAction instead.
SaveNode core/modules/node/src/Plugin/Action/SaveNode.php class in drupal:8.5.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Action\Plugin\Action\SaveAction instead.
Schema::fieldSetDefault core/lib/Drupal/Core/Database/Schema.php function in drupal:8.7.0 and is removed from drupal:9.0.0. Instead, call ::changeField() passing a full field specification. 3
Schema::fieldSetNoDefault core/lib/Drupal/Core/Database/Schema.php function in drupal:8.7.0 and is removed from drupal:9.0.0. Instead, call ::changeField() passing a full field specification. 3
SchemaCheckTestTrait core/modules/config/src/Tests/SchemaCheckTestTrait.php trait in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\Tests\SchemaCheckTestTrait instead.

Pages

Other projects