symfony: [DependencyInjection][Bug] Cryptic service name with anonymous service as argument
Q | A |
---|---|
Bug report? | no |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 4.0 |
While working around #26629, I moved my service into a separate file, like this:
<services>
<service parent="liip_imagine.imagick" id="image.imagine">
<call method="setMetadataReader">
<argument type="service">
<service id="App\Infrastructure\Imagine\Metadata\ExifMetadataReader" lazy="true"/>
</argument>
</call>
</service>
</services>
This produces a very cryptic error (note the name, also the class is not set, but the ID is):
The definition for "1_~t2jBfn7" 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.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (17 by maintainers)
Yes, we mean Definition instances instead of Reference
@xabbuh sure.