Skip to content

Custom UserChecker dependency on "non existing service" error #37365

@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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy