From 7d510cc1bc171cf3b6bcfc1cbee95e41988f6e74 Mon Sep 17 00:00:00 2001 From: Gabor Hojtsy Date: Wed, 28 Jun 2017 15:34:56 +0200 Subject: [PATCH] Issue #2873789 by ponies, Wim Leers, xjm: Add change record to @deprecated for TypeLinkManagerInterface --- core/modules/hal/src/LinkManager/RelationLinkManager.php | 1 + core/modules/hal/src/LinkManager/TypeLinkManager.php | 1 + core/modules/hal/tests/modules/hal_test/hal_test.module | 4 ++++ core/modules/rest/config/schema/rest.schema.yml | 1 + core/modules/rest/rest.api.php | 4 ++++ .../rest/src/LinkManager/ConfigurableLinkManagerInterface.php | 2 ++ core/modules/rest/src/LinkManager/LinkManager.php | 2 ++ core/modules/rest/src/LinkManager/LinkManagerBase.php | 2 ++ core/modules/rest/src/LinkManager/LinkManagerInterface.php | 2 ++ core/modules/rest/src/LinkManager/RelationLinkManager.php | 2 ++ .../rest/src/LinkManager/RelationLinkManagerInterface.php | 2 ++ core/modules/rest/src/LinkManager/TypeLinkManager.php | 2 ++ .../modules/rest/src/LinkManager/TypeLinkManagerInterface.php | 2 ++ core/modules/rest/src/RestServiceProvider.php | 3 +++ 14 files changed, 30 insertions(+) diff --git a/core/modules/hal/src/LinkManager/RelationLinkManager.php b/core/modules/hal/src/LinkManager/RelationLinkManager.php index 3146e12c58b2..a33b6c32bbd3 100644 --- a/core/modules/hal/src/LinkManager/RelationLinkManager.php +++ b/core/modules/hal/src/LinkManager/RelationLinkManager.php @@ -72,6 +72,7 @@ class RelationLinkManager extends LinkManagerBase implements RelationLinkManager $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; } diff --git a/core/modules/hal/src/LinkManager/TypeLinkManager.php b/core/modules/hal/src/LinkManager/TypeLinkManager.php index c3a948ff86eb..51b2de5032c5 100644 --- a/core/modules/hal/src/LinkManager/TypeLinkManager.php +++ b/core/modules/hal/src/LinkManager/TypeLinkManager.php @@ -73,6 +73,7 @@ class TypeLinkManager extends LinkManagerBase implements TypeLinkManagerInterfac $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; } diff --git a/core/modules/hal/tests/modules/hal_test/hal_test.module b/core/modules/hal/tests/modules/hal_test/hal_test.module index 8788eaf41eac..823634587158 100644 --- a/core/modules/hal/tests/modules/hal_test/hal_test.module +++ b/core/modules/hal/tests/modules/hal_test/hal_test.module @@ -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'])) { diff --git a/core/modules/rest/config/schema/rest.schema.yml b/core/modules/rest/config/schema/rest.schema.yml index 5f181c9cbdf5..98b35ae6f01f 100644 --- a/core/modules/rest/config/schema/rest.schema.yml +++ b/core/modules/rest/config/schema/rest.schema.yml @@ -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' diff --git a/core/modules/rest/rest.api.php b/core/modules/rest/rest.api.php index ac601072bea0..6c09bbff530b 100644 --- a/core/modules/rest/rest.api.php +++ b/core/modules/rest/rest.api.php @@ -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. * diff --git a/core/modules/rest/src/LinkManager/ConfigurableLinkManagerInterface.php b/core/modules/rest/src/LinkManager/ConfigurableLinkManagerInterface.php index f9343f40c700..e521459195bd 100644 --- a/core/modules/rest/src/LinkManager/ConfigurableLinkManagerInterface.php +++ b/core/modules/rest/src/LinkManager/ConfigurableLinkManagerInterface.php @@ -7,5 +7,7 @@ use Drupal\hal\LinkManager\ConfigurableLinkManagerInterface as MovedConfigurable /** * @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 {} diff --git a/core/modules/rest/src/LinkManager/LinkManager.php b/core/modules/rest/src/LinkManager/LinkManager.php index 4cb8384f6178..4586c62ecdce 100644 --- a/core/modules/rest/src/LinkManager/LinkManager.php +++ b/core/modules/rest/src/LinkManager/LinkManager.php @@ -7,5 +7,7 @@ use Drupal\hal\LinkManager\LinkManager as MovedLinkManager; /** * @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 {} diff --git a/core/modules/rest/src/LinkManager/LinkManagerBase.php b/core/modules/rest/src/LinkManager/LinkManagerBase.php index 13f700422494..85eb7b70a923 100644 --- a/core/modules/rest/src/LinkManager/LinkManagerBase.php +++ b/core/modules/rest/src/LinkManager/LinkManagerBase.php @@ -7,5 +7,7 @@ use Drupal\hal\LinkManager\LinkManagerBase as MovedLinkManagerBase; /** * @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 {} diff --git a/core/modules/rest/src/LinkManager/LinkManagerInterface.php b/core/modules/rest/src/LinkManager/LinkManagerInterface.php index 15852a59d3d0..9f5d2f2d2517 100644 --- a/core/modules/rest/src/LinkManager/LinkManagerInterface.php +++ b/core/modules/rest/src/LinkManager/LinkManagerInterface.php @@ -7,5 +7,7 @@ use Drupal\hal\LinkManager\LinkManagerInterface as MovedLinkManagerInterface; /** * @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 {} diff --git a/core/modules/rest/src/LinkManager/RelationLinkManager.php b/core/modules/rest/src/LinkManager/RelationLinkManager.php index 8a5d49d5a380..6690e2100634 100644 --- a/core/modules/rest/src/LinkManager/RelationLinkManager.php +++ b/core/modules/rest/src/LinkManager/RelationLinkManager.php @@ -7,5 +7,7 @@ use Drupal\hal\LinkManager\RelationLinkManager as MovedLinkRelationManager; /** * @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 {} diff --git a/core/modules/rest/src/LinkManager/RelationLinkManagerInterface.php b/core/modules/rest/src/LinkManager/RelationLinkManagerInterface.php index c9a89388f11a..c2eec34612b6 100644 --- a/core/modules/rest/src/LinkManager/RelationLinkManagerInterface.php +++ b/core/modules/rest/src/LinkManager/RelationLinkManagerInterface.php @@ -7,5 +7,7 @@ use Drupal\hal\LinkManager\RelationLinkManagerInterface as MovedRelationLinkMana /** * @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 {} diff --git a/core/modules/rest/src/LinkManager/TypeLinkManager.php b/core/modules/rest/src/LinkManager/TypeLinkManager.php index 7c81a2582380..6d7ba03ecfd5 100644 --- a/core/modules/rest/src/LinkManager/TypeLinkManager.php +++ b/core/modules/rest/src/LinkManager/TypeLinkManager.php @@ -7,5 +7,7 @@ use Drupal\hal\LinkManager\TypeLinkManager as MovedTypeLinkManager; /** * @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 {} diff --git a/core/modules/rest/src/LinkManager/TypeLinkManagerInterface.php b/core/modules/rest/src/LinkManager/TypeLinkManagerInterface.php index 85407fff6553..9a37049e240e 100644 --- a/core/modules/rest/src/LinkManager/TypeLinkManagerInterface.php +++ b/core/modules/rest/src/LinkManager/TypeLinkManagerInterface.php @@ -7,5 +7,7 @@ use Drupal\hal\LinkManager\TypeLinkManagerInterface as MovedTypeLinkManagerInter /** * @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 {} diff --git a/core/modules/rest/src/RestServiceProvider.php b/core/modules/rest/src/RestServiceProvider.php index ca6b14b76fb1..e705de4177d0 100644 --- a/core/modules/rest/src/RestServiceProvider.php +++ b/core/modules/rest/src/RestServiceProvider.php @@ -27,18 +27,21 @@ class RestServiceProvider implements ServiceProviderInterface { 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);