diff --git a/core/lib/Drupal/Core/CoreBundle.php b/core/lib/Drupal/Core/CoreBundle.php index 170c514..8263331 100644 --- a/core/lib/Drupal/Core/CoreBundle.php +++ b/core/lib/Drupal/Core/CoreBundle.php @@ -237,8 +237,7 @@ public function build(ContainerBuilder $container) { $container->register('serializer.normalizer.typed_data', 'Drupal\Core\Serialization\TypedDataNormalizer')->addTag('normalizer'); $container->register('serializer.encoder.json', 'Drupal\Core\Serialization\JsonEncoder') - ->addTag('encoder') - ->addTag('format_info', array('json' => 'JSON')); + ->addTag('encoder', array('format' => array('json' => 'JSON'))); $container->register('flood', 'Drupal\Core\Flood\DatabaseBackend') ->addArgument(new Reference('database')); diff --git a/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterSerializationClassesPass.php b/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterSerializationClassesPass.php index 267db46..04544d2 100644 --- a/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterSerializationClassesPass.php +++ b/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterSerializationClassesPass.php @@ -45,8 +45,8 @@ public function process(ContainerBuilder $container) { // Find all serialization formats known. $formats = array(); - foreach ($container->findTaggedServiceIds('format_info') as $id => $attributes) { - foreach ($attributes[0] as $name => $label) { + foreach ($container->findTaggedServiceIds('encoder') as $id => $attributes) { + foreach ($attributes['format'] as $name => $label) { $formats[$name] = $label; } } diff --git a/core/modules/jsonld/lib/Drupal/jsonld/JsonldBundle.php b/core/modules/jsonld/lib/Drupal/jsonld/JsonldBundle.php index fc19e4e..176779a 100644 --- a/core/modules/jsonld/lib/Drupal/jsonld/JsonldBundle.php +++ b/core/modules/jsonld/lib/Drupal/jsonld/JsonldBundle.php @@ -63,10 +63,12 @@ public function build(ContainerBuilder $container) { // Add Encoders to service container. foreach ($encoders as $format => $encoder_class) { $container->register("serializer.encoder.{$format}", $encoder_class) - ->addTag('encoder', array('priority' => $priority)) - ->addTag('format_info', array( - 'jsonld' => 'JSON-LD', - 'drupal_jsonld' => 'Drupal JSON-LD', + ->addTag('encoder', array( + 'priority' => $priority, + 'format' => array( + 'jsonld' => 'JSON-LD', + 'drupal_jsonld' => 'Drupal JSON-LD', + ), )); }