8000 Custom UserChecker dependency on "non existing service" error · Issue #37365 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Custom UserChecker dependency on "non existing service" error #37365
Closed
@filipealonso

Description

@filipealonso

Symfony version(s) affected: 5.1

Description
Created a custom UserChecker and get the following error
The service "security.listener.user_checker" has a dependency on a non-existent service "Symfony\Component\Security\Core\User\UserCheckerInterface".

How to reproduce
Follow the provided documentation. https://symfony.com/doc/current/security/user_checkers.html .

Since the autowire and autoconfigure are on I didn't declare anything else in the services.yaml like it says at the bottom of the article.

When I add
pattern: ^/
user_checker: App\Security\UserChecker
to the security.yaml file I get the error as mentioned above.

Possible Solution
Don't know. Either there's something wrong/outdated with the documentation or there's something wrong with the autowire/autoconfigure I assume.

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

      0