diff --git a/core/modules/serialization/lib/Drupal/serialization/Normalizer/EntityNormalizer.php b/core/modules/serialization/lib/Drupal/serialization/Normalizer/EntityNormalizer.php index f854887..8470a68 100644 --- a/core/modules/serialization/lib/Drupal/serialization/Normalizer/EntityNormalizer.php +++ b/core/modules/serialization/lib/Drupal/serialization/Normalizer/EntityNormalizer.php @@ -31,11 +31,11 @@ class EntityNormalizer extends NormalizerBase implements DenormalizerInterface { protected $entityManager; /** - * Sets the entity manager. + * Constructs an EntityNormalizer object. * * @param \Drupal\Core\Entity\EntityManager $entity_manager */ - public function setEntityManager(EntityManager $entity_manager) { + public function __construct(EntityManager $entity_manager) { $this->entityManager = $entity_manager; } diff --git a/core/modules/serialization/serialization.services.yml b/core/modules/serialization/serialization.services.yml index 4e27ad1..df3f9da 100644 --- a/core/modules/serialization/serialization.services.yml +++ b/core/modules/serialization/serialization.services.yml @@ -6,8 +6,7 @@ services: class: Drupal\serialization\Normalizer\EntityNormalizer tags: - { name: normalizer } - calls: - - [setEntityManager, ['@plugin.manager.entity']] + arguments: ['@plugin.manager.entity'] serializer.normalizer.complex_data: class: Drupal\serialization\Normalizer\ComplexDataNormalizer tags: