Commit f182e9d2 authored by alexpott's avatar alexpott

Issue #2841542 by Wim Leers:...

Issue #2841542 by Wim Leers: \Drupal\serialization\EventSubscriber\UserRouteAlterSubscriber has serializer service injected, but doesn't use it — also makes route rebuilding more expensive
parent b149b639
......@@ -88,4 +88,4 @@ services:
class: Drupal\serialization\EventSubscriber\UserRouteAlterSubscriber
tags:
- { name: event_subscriber }
arguments: ['@serializer', '%serializer.formats%']
arguments: ['%serializer.formats%']
......@@ -5,20 +5,12 @@
use Drupal\Core\Routing\RouteBuildEvent;
use Drupal\Core\Routing\RoutingEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Serializer\SerializerInterface;
/**
* Alters user authentication routes to support additional serialization formats.
*/
class UserRouteAlterSubscriber implements EventSubscriberInterface {
/**
* The serializer.
*
* @var \Symfony\Component\Serializer\Serializer
*/
protected $serializer;
/**
* The available serialization formats.
*
......@@ -29,13 +21,10 @@ class UserRouteAlterSubscriber implements EventSubscriberInterface {
/**
* UserRouteAlterSubscriber constructor.
*
* @param \Symfony\Component\Serializer\SerializerInterface $serializer
* The serializer service.
* @param array $serializer_formats
* The available serializer formats.
*/
public function __construct(SerializerInterface $serializer, array $serializer_formats) {
$this->serializer = $serializer;
public function __construct(array $serializer_formats) {
$this->serializerFormats = $serializer_formats;
}
......
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