Use annotations reader without cache

This commit is contained in:
Guilhem Niot 2020-12-29 10:27:09 +01:00
parent 820c058de7
commit e57ede23ed
4 changed files with 5 additions and 5 deletions

View File

@ -29,7 +29,7 @@ final class ConfigurationPass implements CompilerPassInterface
$container->register('nelmio_api_doc.model_describers.form', FormModelDescriber::class)
->setPublic(false)
->addArgument(new Reference('form.factory'))
->addArgument(new Reference('annotation_reader'))
->addArgument(new Reference('annotations.reader'))
->addTag('nelmio_api_doc.model_describer', ['priority' => 100]);
}
}

View File

@ -87,7 +87,7 @@ final class NelmioApiDocExtension extends Extension implements PrependExtensionI
->setArguments([
new Reference(sprintf('nelmio_api_doc.routes.%s', $area)),
new Reference('nelmio_api_doc.controller_reflector'),
new Reference('annotation_reader'),
new Reference('annotations.reader'),
new Reference('logger'),
])
->addTag(sprintf('nelmio_api_doc.describer.%s', $area), ['priority' => -200]);
@ -160,7 +160,7 @@ final class NelmioApiDocExtension extends Extension implements PrependExtensionI
->setArguments([
new Reference('jms_serializer.metadata_factory'),
$jmsNamingStrategy,
new Reference('annotation_reader'),
new Reference('annotations.reader'),
])
->addTag('nelmio_api_doc.model_describer', ['priority' => 50]);

View File

@ -5,7 +5,7 @@
<services>
<service id="nelmio_api_doc.route_describers.fos_rest" class="Nelmio\ApiDocBundle\RouteDescriber\FosRestDescriber" public="false">
<argument type="service" id="annotation_reader" />
<argument type="service" id="annotation_reader" /> <!-- we don't deal with @OA annotations in this describer so we can use the cached reader -->
<tag name="nelmio_api_doc.route_describer" priority="-250" />
</service>

View File

@ -40,7 +40,7 @@
<!-- Model Describers -->
<service id="nelmio_api_doc.model_describers.object" class="Nelmio\ApiDocBundle\ModelDescriber\ObjectModelDescriber" public="false">
<argument type="service" id="property_info" />
<argument type="service" id="annotation_reader" />
<argument type="service" id="annotations.reader" />
<argument type="tagged" tag="nelmio_api_doc.object_model.property_describer" />
<argument type="service" id="serializer.name_converter.metadata_aware" on-invalid="ignore" />