Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[DependencyInjection][Bug] Cryptic service name with anonymous service as argument #26630

Copy link
Copy link
Closed
@dkarlovi

Description

@dkarlovi
Issue body actions
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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.