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
TypeError: Nelmio\ApiDocBundle\Describer\ApiPlatformDescriber::__construct(): Argument #1 ($documentation) must be of type ApiPlatform\Documentation\DocumentationInterface, ApiPlatform\OpenApi\OpenApi given
#5547
Closed
Aerendir opened this issue
Apr 16, 2023
· 5 comments
With ApiPlatform v.3.1.6, in NelmioApiDocBundle we receive this error:
TypeError: Nelmio\ApiDocBundle\Describer\ApiPlatformDescriber::__construct(): Argument #1 ($documentation) must be of type ApiPlatform\Documentation\DocumentationInterface, ApiPlatform\OpenApi\OpenApi given, called in /srv/app/var/cache/test/ContainerU6TwUpp/getNelmioApiDoc_Describers_ApiPlatformService.php on line 24
How to reproduce
Install api-platform/core and try to generate the documentation through NelmioApiDocBundle.
Possible Solution
A possible fix was made in NelmioApiDocBundle, but it seems not be sufficient as the DocumentationInterface is used in many places.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Anyway, this should have been considered a breaking change and not included in a minor release: this is causing a lot of issues and impossibilities to update dependencies.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This was fixed in NelmioApiDocBundle.
Although theoretically it's a bc break in API platform I think it's not much for most users and this can be closed.
API Platform version(s) affected: ^3.1.6
Description
With ApiPlatform v.3.1.6, in NelmioApiDocBundle we receive this error:
How to reproduce
Install
api-platform/core
and try to generate the documentation throughNelmioApiDocBundle
.Possible Solution
A possible fix was made in
NelmioApiDocBundle
, but it seems not be sufficient as theDocumentationInterface
is used in many places.See nelmio/NelmioApiDocBundle#2092
Additional Context
I suppose the sub-tree split done in
3.1.6
broke the code.Related issues
nelmio/NelmioApiDocBundle#2089
The text was updated successfully, but these errors were encountered: