You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to upgrade from an old version of api-platform/core to its latest version. We are using an older and tweaked version of the code suggested in https://api-platform.com/docs/core/bootstrap/.
But If I try to simply copy and paste the code, I can see some errors :
undefined classes, like ApiPlatform\Action\ExceptionAction, ApiPlatform\JsonSchema\TypeFactory or ApiPlatform\Serializer\ErrorNormalizer for example ;
some methods are called with two many arguments, just like `$hydraConstraintViolationNormalizer = new HydraConstraintViolationListNormalizer($apiUrlGenerator, [], $nameConverter);
some methods are called with arguments with wrong types : for example, $validateListener = new ValidateListener($validator, $resourceMetadataFactory); displays : "Expected parameter of type 'ApiPlatform\State\ProviderInterface', 'Validator' provided".
Being an api-platform noobie, I was wondering if there was somewhere a patched version of this documentation ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm trying to upgrade from an old version of api-platform/core to its latest version. We are using an older and tweaked version of the code suggested in https://api-platform.com/docs/core/bootstrap/.
But If I try to simply copy and paste the code, I can see some errors :
ApiPlatform\Action\ExceptionAction
,ApiPlatform\JsonSchema\TypeFactory
orApiPlatform\Serializer\ErrorNormalizer
for example ;$validateListener = new ValidateListener($validator, $resourceMetadataFactory);
displays : "Expected parameter of type 'ApiPlatform\State\ProviderInterface', 'Validator' provided".Being an api-platform noobie, I was wondering if there was somewhere a patched version of this documentation ?
Thanks in advance !
Beta Was this translation helpful? Give feedback.
All reactions