Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated service in construct of UserProvider #761

Open
filippovicari426 opened this issue Apr 2, 2024 · 0 comments
Open

Deprecated service in construct of UserProvider #761

filippovicari426 opened this issue Apr 2, 2024 · 0 comments

Comments

@filippovicari426
Copy link

Problem

When doing cache clear after the installation of the package with composer require "knplabs/doctrine-behaviors:^2.6.2" the following error occours

Cannot autowire service "Knp\DoctrineBehaviors\Provider\UserProvider": argument "$security" of method "__construct()" references class "Symfony\Component\Security\Core\Security" but no such service exists. Try changing the type-hint to
Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface" instead.

Symfony version:

7.0.4

Step to install latest version:

  • Followed answer at issues/757
  • manually downgraded the conflicted composer packages from 7.0 to 6.4
  • installed security from composer require symfony/security-bundle as Symfony official doc

Proposed fix

change Symfony\Component\Security\Core\Security to Symfony\Bundle\SecurityBundle\Security in use for Knp\DoctrineBehaviors\Provider\UserProvider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant