X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fserialization%2Fsrc%2FRegisterSerializationClassesCompilerPass.php;h=3979e01e992a016289d9857839147dd788262e07;hb=4f1b9b4ab48a8498afac9e2213a02a23ccf4a06c;hp=10474d17e33ffcfd42b028168f49dd1fb950b506;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/serialization/src/RegisterSerializationClassesCompilerPass.php b/web/core/modules/serialization/src/RegisterSerializationClassesCompilerPass.php index 10474d17e..3979e01e9 100644 --- a/web/core/modules/serialization/src/RegisterSerializationClassesCompilerPass.php +++ b/web/core/modules/serialization/src/RegisterSerializationClassesCompilerPass.php @@ -23,6 +23,9 @@ class RegisterSerializationClassesCompilerPass implements CompilerPassInterface // Retrieve registered Normalizers and Encoders from the container. foreach ($container->findTaggedServiceIds('normalizer') as $id => $attributes) { + // The 'serializer' service is the public API: mark normalizers private. + $container->getDefinition($id)->setPublic(FALSE); + // If there is a BC key present, pass this to determine if the normalizer // should be skipped. if (isset($attributes[0]['bc']) && $this->normalizerBcSettingIsEnabled($attributes[0]['bc'], $attributes[0]['bc_config_name'])) { @@ -33,6 +36,9 @@ class RegisterSerializationClassesCompilerPass implements CompilerPassInterface $normalizers[$priority][] = new Reference($id); } foreach ($container->findTaggedServiceIds('encoder') as $id => $attributes) { + // The 'serializer' service is the public API: mark encoders private. + $container->getDefinition($id)->setPublic(FALSE); + $priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0; $encoders[$priority][] = new Reference($id); }