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
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.
According to the documentation, the Symfony\Component\DependencyInjection\ServiceLocator should be used in the definition.
The fix for NelmioApiDocBundle is trivial and I've already opened nelmio/NelmioApiDocBundle#1808 to address the issue. However, since this bundle broke because of a Symfony upgrade, I wanted to clarify if we want to treat this issue as a regression.
The text was updated successfully, but these errors were encountered:
I'm closing because this is a compile-time behavior change that won't explode a prod system.
This was also relying on a side-effect that we cannot maintain.
Thanks for opening.
…ith no class (nicolas-grekas)
This PR was merged into the 5.3 branch.
Discussion
----------
[DependencyInjection] accept service locator definitions with no class
| Q | A
| ------------- | ---
| Branch? | 5.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#40861, fix#41612
| License | MIT
| Doc PR | -
Commits
-------
6bc8ec6 [DependencyInjection] accept service locator definitions with no class
Symfony version(s) affected: 5.3.0-beta1
Description
See nelmio/NelmioApiDocBundle#1807
In Symfony 5.2, it was possible to define a service locator service without defining the actual class of the service:
https://github.com/nelmio/NelmioApiDocBundle/blob/bf77277f2fe7c52a5226493d6593659ddb8b9fb8/DependencyInjection/NelmioApiDocExtension.php#L132-L138
In Symfony 5.3, this code fails:
According to the documentation, the
Symfony\Component\DependencyInjection\ServiceLocator
should be used in the definition.The fix for NelmioApiDocBundle is trivial and I've already opened nelmio/NelmioApiDocBundle#1808 to address the issue. However, since this bundle broke because of a Symfony upgrade, I wanted to clarify if we want to treat this issue as a regression.
The text was updated successfully, but these errors were encountered: