Skip to content

Example from doc not working under Symfony 6 #1154

@hunhejj

Description

@hunhejj
Q A
Bug report? no
Feature request? no
BC Break report? no
RFC? no
Version/Branch master

I would like to call the Authorization Checker directly within my GraphQL type definition in YAML as suggested in security/fields-public-control.md.

However this fails under Symfony 6 with the following message:

The "security.authorization_checker" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.

Hence the doc should be updated. Is there any nice way to achieve the above besides of creating my own dummy wrapper around the AuthorizationChecker?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions