core/modules/hal/src/LinkManager/RelationLinkManager.php | 2 +- core/modules/hal/src/LinkManager/TypeLinkManager.php | 2 +- core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/modules/hal/src/LinkManager/RelationLinkManager.php b/core/modules/hal/src/LinkManager/RelationLinkManager.php index 719dc70..495b779 100644 --- a/core/modules/hal/src/LinkManager/RelationLinkManager.php +++ b/core/modules/hal/src/LinkManager/RelationLinkManager.php @@ -73,7 +73,7 @@ public function getRelationUri($entity_type, $bundle, $field_name, $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->alterDeprecated('rest_relation_uri', $uri, $context); + $this->moduleHandler->alterDeprecated('Implement hook_hal_relation_uri_alter() instead.', '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 11922c0..93ffce5 100644 --- a/core/modules/hal/src/LinkManager/TypeLinkManager.php +++ b/core/modules/hal/src/LinkManager/TypeLinkManager.php @@ -74,7 +74,7 @@ public function getTypeUri($entity_type, $bundle, $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->alterDeprecated('rest_type_uri', $uri, $context); + $this->moduleHandler->alterDeprecated('Implement hook_hal_type_uri_alter() instead.', 'rest_type_uri', $uri, $context); return $uri; } diff --git a/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php b/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php index 1387149..88be301 100644 --- a/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php +++ b/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php @@ -13,6 +13,7 @@ /** * @coversDefaultClass \Drupal\hal\LinkManager\LinkManager * @group hal + * @group legacy */ class HalLinkManagerTest extends KernelTestBase { @@ -49,6 +50,7 @@ protected function setUp() { /** * @covers ::getTypeUri * @dataProvider providerTestGetTypeUri + * @expectedDeprecation The deprecated alter hook hook_rest_type_uri_alter() is implemented in these functions: hal_test_rest_type_uri_alter. Implement hook_hal_type_uri_alter() instead. */ public function testGetTypeUri($link_domain, $entity_type, $bundle, array $context, $expected_return, array $expected_context) { $hal_settings = \Drupal::configFactory()->getEditable('hal.settings'); @@ -142,6 +144,7 @@ public function providerTestGetTypeUri() { /** * @covers ::getRelationUri * @dataProvider providerTestGetRelationUri + * @expectedDeprecation The deprecated alter hook hook_rest_relation_uri_alter() is implemented in these functions: hal_test_rest_relation_uri_alter. Implement hook_hal_relation_uri_alter() instead. */ public function testGetRelationUri($link_domain, $entity_type, $bundle, $field_name, array $context, $expected_return, array $expected_context) { $hal_settings = \Drupal::configFactory()->getEditable('hal.settings');