Commit 7d510cc1 authored by Gábor Hojtsy's avatar Gábor Hojtsy

Issue #2873789 by ponies, Wim Leers, xjm: Add change record to @deprecated for...

Issue #2873789 by ponies, Wim Leers, xjm: Add change record to @deprecated for TypeLinkManagerInterface
parent 6fb6c6b7
......@@ -72,6 +72,7 @@ public function getRelationUri($entity_type, $bundle, $field_name, $context = []
$this->moduleHandler->alter('hal_relation_uri', $uri, $context);
// @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This
// hook is invoked to maintain backwards compatibility
// @see https://www.drupal.org/node/2830467
$this->moduleHandler->alter('rest_relation_uri', $uri, $context);
return $uri;
}
......
......@@ -73,6 +73,7 @@ public function getTypeUri($entity_type, $bundle, $context = []) {
$this->moduleHandler->alter('hal_type_uri', $uri, $context);
// @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This
// hook is invoked to maintain backwards compatibility
// @see https://www.drupal.org/node/2830467
$this->moduleHandler->alter('rest_type_uri', $uri, $context);
return $uri;
}
......
......@@ -27,6 +27,8 @@ function hal_test_hal_relation_uri_alter(&$uri, $context = []) {
* Implements hook_rest_type_uri_alter().
*
* @deprecated Kept only for BC test coverage, see \Drupal\Tests\hal\Kernel\HalLinkManagerTest::testGetTypeUri().
*
* @see https://www.drupal.org/node/2830467
*/
function hal_test_rest_type_uri_alter(&$uri, $context = []) {
if (!empty($context['rest_test'])) {
......@@ -38,6 +40,8 @@ function hal_test_rest_type_uri_alter(&$uri, $context = []) {
* Implements hook_rest_relation_uri_alter().
*
* @deprecated Kept only for BC test coverage, see \Drupal\Tests\hal\Kernel\HalLinkManagerTest::testGetRelationUri().
*
* @see https://www.drupal.org/node/2830467
*/
function hal_test_rest_relation_uri_alter(&$uri, $context = []) {
if (!empty($context['rest_test'])) {
......
......@@ -4,6 +4,7 @@ rest.settings:
label: 'REST settings'
mapping:
# @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
# @see https://www.drupal.org/node/2830467
link_domain:
type: string
label: 'Domain of the relation'
......
......@@ -34,6 +34,8 @@ function hook_rest_resource_alter(&$definitions) {
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. Use
* hook_serialization_type_uri_alter() instead. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*
* Modules may wish to alter the type URI generated for a resource based on the
* context of the serializer/normalizer operation.
*
......@@ -61,6 +63,8 @@ function hook_rest_type_uri_alter(&$uri, $context = []) {
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. Use
* hook_serialization_relation_uri_alter() instead. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*
* Modules may wish to alter the relation URI generated for a resource based on
* the context of the serializer/normalizer operation.
*
......
......@@ -7,5 +7,7 @@
/**
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This has
* been moved to the hal module. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*/
interface ConfigurableLinkManagerInterface extends MovedConfigurableLinkManagerInterface {}
......@@ -7,5 +7,7 @@
/**
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This has
* been moved to the hal module. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*/
class LinkManager extends MovedLinkManager implements LinkManagerInterface {}
......@@ -7,5 +7,7 @@
/**
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This has
* been moved to the hal module. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*/
abstract class LinkManagerBase extends MovedLinkManagerBase {}
......@@ -7,5 +7,7 @@
/**
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This has
* been moved to the hal module. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*/
interface LinkManagerInterface extends MovedLinkManagerInterface {}
......@@ -7,5 +7,7 @@
/**
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This has
* been moved to the hal module. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*/
class RelationLinkManager extends MovedLinkRelationManager implements RelationLinkManagerInterface {}
......@@ -7,5 +7,7 @@
/**
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This has
* been moved to the hal module. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*/
interface RelationLinkManagerInterface extends MovedRelationLinkManagerInterface {}
......@@ -7,5 +7,7 @@
/**
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This has
* been moved to the hal module. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*/
class TypeLinkManager extends MovedTypeLinkManager implements TypeLinkManagerInterface {}
......@@ -7,5 +7,7 @@
/**
* @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This has
* been moved to the hal module. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*/
interface TypeLinkManagerInterface extends MovedTypeLinkManagerInterface {}
......@@ -27,18 +27,21 @@ public function register(ContainerBuilder $container) {
if (isset($modules['hal'])) {
// @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
// Use hal.link_manager instead.
// @see https://www.drupal.org/node/2830467
$service_definition = new DefinitionDecorator(new Reference('hal.link_manager'));
$service_definition->setClass(LinkManager::class);
$container->setDefinition('rest.link_manager', $service_definition);
// @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
// Use hal.link_manager.type instead.
// @see https://www.drupal.org/node/2830467
$service_definition = new DefinitionDecorator(new Reference('hal.link_manager.type'));
$service_definition->setClass(TypeLinkManager::class);
$container->setDefinition('rest.link_manager.type', $service_definition);
// @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
// Use hal.link_manager.relation instead.
// @see https://www.drupal.org/node/2830467
$service_definition = new DefinitionDecorator(new Reference('hal.link_manager.relation'));
$service_definition->setClass(RelationLinkManager::class);
$container->setDefinition('rest.link_manager.relation', $service_definition);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment