Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a class to the nelmio_api_doc.generator_locator service definition #1808

Merged
merged 1 commit into from
Apr 19, 2021

Conversation

derrabus
Copy link
Contributor

@derrabus derrabus commented Apr 18, 2021

I've upgraded an application that uses this bundle to Symfony 5.3, which resulted in the following error:

The definition for "nelmio_api_doc.generator_locator" has no class. If you intend to inject this service dynamically at runtime, please mark it as synthetic=true. If this is an abstract definition solely used by child definitions, please add abstract=true, otherwise specify a class to get rid of this error.

Symfony's documentation on service locators uses a dedicated class, but NelmioApiDocExtension doesn't.

I've fixed the error by adding the documented class to the service definition.

Fixes #1807

@michaljusiega
Copy link

See #1807 ;)

@derrabus
Copy link
Contributor Author

derrabus commented Apr 18, 2021

Oh, I did not see that issue. Thanks, I've linked it in the description.

@GuilhemN
Copy link
Collaborator

Great! Thank you @derrabus and @michaljusiega :)

@derrabus derrabus deleted the bugfix/service-locator branch April 19, 2021 12:08
@derrabus
Copy link
Contributor Author

Thank you very much for merging, @GuilhemN! May I ask you to merge 3.x into master? This would unblock further tests with Symfony 5.3 for me because my app already uses version 4 of this bundle.

@GuilhemN
Copy link
Collaborator

Sure, it's done :)

@derrabus
Copy link
Contributor Author

Thank you! ❤️

@Yozhef
Copy link

Yozhef commented Jun 2, 2021

@GuilhemN can you please release this fix in 4.1 version

@derrabus
Copy link
Contributor Author

derrabus commented Jun 2, 2021

@Yozhef See #1825 for this discussion.

@GuilhemN
Copy link
Collaborator

GuilhemN commented Jun 7, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants