Open dannyvw opened 1 month ago
I wish to know too 😁
+1
@dannyvw @james2001 @dannyvw
This helped me: Upgrade Guide
Special guest:
php bin/console api:upgrade-resource
From the topic The Upgrade Command
I managed to "solve it" by decorating the event listener QueryParameterValidateListener ... This is the snippet in my services.yaml file:
services:
ApiPlatform\Symfony\EventListener\QueryParameterValidateListener:
decorates: 'api_platform.listener.view.validate_query_parameters'
arguments:
$queryParameterValidator: '@App\State\SimpleStateProvider'
App\State\SimpleStateProvider
is a dummy class with this content:
class SimpleStateProvider implements ProviderInterface
{
public function provide(Operation $operation, array $uriVariables = [], array $context = []): object|array|null
{
return [];
}
}
I mean, it's more like a workaround than a solution.
API Platform version(s) affected: 3.4
Description
User Deprecated: Since api-platform/core 3.3: Use a "ApiPlatform\State\ProviderInterface" as first argument in "ApiPlatform\Symfony\EventListener\QueryParameterValidateListener" instead of "ApiPlatform\ParameterValidator\ParameterValidator".
How to reproduce
Possible Solution
Additional Context
How can we solve this deprecation?