Copied!

Adds all services with the tags "serializer.encoder" and "serializer.normalizer" as encoders and normalizers to the "serializer" service.

CloneableInstantiable
Methods
public process(Symfony\Component\DependencyInjection\ContainerBuilder $container) : void
Constants
private Symfony\Component\Serializer\DependencyInjection\SerializerPass::NAME_CONVERTER_METADATA_AWARE_ID = 'serializer.name_converter.metadata_aware'
Methods
private bindDefaultContext(Symfony\Component\DependencyInjection\ContainerBuilder $container, array $services, array $defaultContext, ?string $circularReferenceHandler, ?string $maxDepthHandler) : void
private buildChildDefinitions(Symfony\Component\DependencyInjection\ContainerBuilder $container, string $serializerName, array $services, array $config) : array
private buildChildNameConverterDefinition(Symfony\Component\DependencyInjection\ContainerBuilder $container, ?string $nameConverter) : ?string
private configureNamedSerializers(Symfony\Component\DependencyInjection\ContainerBuilder $container, ?string $circularReferenceHandler, ?string $maxDepthHandler) : void
private configureSerializer(Symfony\Component\DependencyInjection\ContainerBuilder $container, string $id, array $normalizers, array $encoders, string $serializerName) : void
private createNamedSerializerTags(Symfony\Component\DependencyInjection\ContainerBuilder $container, string $tagName, string $configName, array $namedSerializers) : void
private findAndSortTaggedServices(Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument|string $tagName, Symfony\Component\DependencyInjection\ContainerBuilder $container, array $exclude = []) : array
 

Finds all services with the given tag name and order them by their priority.

The order of additions must be respected for services having the same priority, and knowing that the \SplPriorityQueue class does not respect the FIFO method, we should not use that class.

  • see https://bugs.php.net/53710
  • see https://bugs.php.net/60926
  • return \Reference[]
private findNameConverterIndex(Symfony\Component\DependencyInjection\ContainerBuilder $container, string $id) : string|int|?null
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration