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

8.4.x
Gabor Hojtsy 2017-06-28 15:34:56 +02:00
parent 6fb6c6b7a7
commit 7d510cc1bc
14 changed files with 30 additions and 0 deletions

View File

@ -72,6 +72,7 @@ class RelationLinkManager extends LinkManagerBase implements RelationLinkManager
$this->moduleHandler->alter('hal_relation_uri', $uri, $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 // @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This
// hook is invoked to maintain backwards compatibility // hook is invoked to maintain backwards compatibility
// @see https://www.drupal.org/node/2830467
$this->moduleHandler->alter('rest_relation_uri', $uri, $context); $this->moduleHandler->alter('rest_relation_uri', $uri, $context);
return $uri; return $uri;
} }

View File

@ -73,6 +73,7 @@ class TypeLinkManager extends LinkManagerBase implements TypeLinkManagerInterfac
$this->moduleHandler->alter('hal_type_uri', $uri, $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 // @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This
// hook is invoked to maintain backwards compatibility // hook is invoked to maintain backwards compatibility
// @see https://www.drupal.org/node/2830467
$this->moduleHandler->alter('rest_type_uri', $uri, $context); $this->moduleHandler->alter('rest_type_uri', $uri, $context);
return $uri; return $uri;
} }

View File

@ -27,6 +27,8 @@ function hal_test_hal_relation_uri_alter(&$uri, $context = []) {
* Implements hook_rest_type_uri_alter(). * Implements hook_rest_type_uri_alter().
* *
* @deprecated Kept only for BC test coverage, see \Drupal\Tests\hal\Kernel\HalLinkManagerTest::testGetTypeUri(). * @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 = []) { function hal_test_rest_type_uri_alter(&$uri, $context = []) {
if (!empty($context['rest_test'])) { if (!empty($context['rest_test'])) {
@ -38,6 +40,8 @@ function hal_test_rest_type_uri_alter(&$uri, $context = []) {
* Implements hook_rest_relation_uri_alter(). * Implements hook_rest_relation_uri_alter().
* *
* @deprecated Kept only for BC test coverage, see \Drupal\Tests\hal\Kernel\HalLinkManagerTest::testGetRelationUri(). * @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 = []) { function hal_test_rest_relation_uri_alter(&$uri, $context = []) {
if (!empty($context['rest_test'])) { if (!empty($context['rest_test'])) {

View File

@ -4,6 +4,7 @@ rest.settings:
label: 'REST settings' label: 'REST settings'
mapping: mapping:
# @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. # @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
# @see https://www.drupal.org/node/2830467
link_domain: link_domain:
type: string type: string
label: 'Domain of the relation' label: 'Domain of the relation'

View File

@ -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 * @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. * 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 * Modules may wish to alter the type URI generated for a resource based on the
* context of the serializer/normalizer operation. * 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 * @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. * 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 * Modules may wish to alter the relation URI generated for a resource based on
* the context of the serializer/normalizer operation. * the context of the serializer/normalizer operation.
* *

View File

@ -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 * @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. * been moved to the hal module. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*/ */
interface ConfigurableLinkManagerInterface extends MovedConfigurableLinkManagerInterface {} interface ConfigurableLinkManagerInterface extends MovedConfigurableLinkManagerInterface {}

View File

@ -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 * @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. * been moved to the hal module. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*/ */
class LinkManager extends MovedLinkManager implements LinkManagerInterface {} class LinkManager extends MovedLinkManager implements LinkManagerInterface {}

View File

@ -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 * @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. * been moved to the hal module. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*/ */
abstract class LinkManagerBase extends MovedLinkManagerBase {} abstract class LinkManagerBase extends MovedLinkManagerBase {}

View File

@ -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 * @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. * been moved to the hal module. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*/ */
interface LinkManagerInterface extends MovedLinkManagerInterface {} interface LinkManagerInterface extends MovedLinkManagerInterface {}

View File

@ -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 * @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. * been moved to the hal module. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*/ */
class RelationLinkManager extends MovedLinkRelationManager implements RelationLinkManagerInterface {} class RelationLinkManager extends MovedLinkRelationManager implements RelationLinkManagerInterface {}

View File

@ -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 * @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. * been moved to the hal module. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*/ */
interface RelationLinkManagerInterface extends MovedRelationLinkManagerInterface {} interface RelationLinkManagerInterface extends MovedRelationLinkManagerInterface {}

View File

@ -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 * @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. * been moved to the hal module. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*/ */
class TypeLinkManager extends MovedTypeLinkManager implements TypeLinkManagerInterface {} class TypeLinkManager extends MovedTypeLinkManager implements TypeLinkManagerInterface {}

View File

@ -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 * @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. * been moved to the hal module. This exists solely for BC.
*
* @see https://www.drupal.org/node/2830467
*/ */
interface TypeLinkManagerInterface extends MovedTypeLinkManagerInterface {} interface TypeLinkManagerInterface extends MovedTypeLinkManagerInterface {}

View File

@ -27,18 +27,21 @@ class RestServiceProvider implements ServiceProviderInterface {
if (isset($modules['hal'])) { if (isset($modules['hal'])) {
// @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. // @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
// Use hal.link_manager instead. // Use hal.link_manager instead.
// @see https://www.drupal.org/node/2830467
$service_definition = new DefinitionDecorator(new Reference('hal.link_manager')); $service_definition = new DefinitionDecorator(new Reference('hal.link_manager'));
$service_definition->setClass(LinkManager::class); $service_definition->setClass(LinkManager::class);
$container->setDefinition('rest.link_manager', $service_definition); $container->setDefinition('rest.link_manager', $service_definition);
// @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. // @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
// Use hal.link_manager.type instead. // 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 = new DefinitionDecorator(new Reference('hal.link_manager.type'));
$service_definition->setClass(TypeLinkManager::class); $service_definition->setClass(TypeLinkManager::class);
$container->setDefinition('rest.link_manager.type', $service_definition); $container->setDefinition('rest.link_manager.type', $service_definition);
// @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. // @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0.
// Use hal.link_manager.relation instead. // 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 = new DefinitionDecorator(new Reference('hal.link_manager.relation'));
$service_definition->setClass(RelationLinkManager::class); $service_definition->setClass(RelationLinkManager::class);
$container->setDefinition('rest.link_manager.relation', $service_definition); $container->setDefinition('rest.link_manager.relation', $service_definition);