diff --git a/src/Metadata/Parameter.php b/src/Metadata/Parameter.php index 8b28aa8e1e1..830eff55566 100644 --- a/src/Metadata/Parameter.php +++ b/src/Metadata/Parameter.php @@ -14,7 +14,7 @@ namespace ApiPlatform\Metadata; use ApiPlatform\OpenApi; -use ApiPlatform\State\ProviderInterface; +use ApiPlatform\State\ParameterProviderInterface; use Symfony\Component\Validator\Constraint; /** @@ -23,11 +23,11 @@ abstract class Parameter { /** - * @param array{type?: string}|null $schema - * @param array $extraProperties - * @param ProviderInterface|callable|string|null $provider - * @param FilterInterface|string|null $filter - * @param Constraint|Constraint[]|null $constraints + * @param array{type?: string}|null $schema + * @param array $extraProperties + * @param ParameterProviderInterface|callable|string|null $provider + * @param FilterInterface|string|null $filter + * @param Constraint|Constraint[]|null $constraints */ public function __construct( protected ?string $key = null, diff --git a/src/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php b/src/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php index 8ffd402a7aa..f36b420a284 100644 --- a/src/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php +++ b/src/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php @@ -38,6 +38,7 @@ use ApiPlatform\Metadata\Util\Inflector; use ApiPlatform\Problem\Serializer\ConstraintViolationListNormalizer; use ApiPlatform\State\ApiResource\Error; +use ApiPlatform\State\ParameterProviderInterface; use ApiPlatform\State\ProcessorInterface; use ApiPlatform\State\ProviderInterface; use ApiPlatform\Symfony\EventListener\AddHeadersListener; @@ -202,6 +203,8 @@ public function load(array $configs, ContainerBuilder $container): void ->addTag('api_platform.state_processor'); $container->registerForAutoconfiguration(UriVariableTransformerInterface::class) ->addTag('api_platform.uri_variables.transformer'); + $container->registerForAutoconfiguration(ParameterProviderInterface::class) + ->addTag('api_platform.parameter_provider'); if (!$container->has('api_platform.state.item_provider')) { $container->setAlias('api_platform.state.item_provider', 'api_platform.state_provider.object');