You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Problem
When doing cache clear after the installation of the package with
composer require "knplabs/doctrine-behaviors:^2.6.2"
the following error occoursCannot 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 toSymfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface"
instead.Symfony version:
7.0.4
Step to install latest version:
composer require symfony/security-bundle
as Symfony official docProposed fix
change
Symfony\Component\Security\Core\Security
toSymfony\Bundle\SecurityBundle\Security
in use forKnp\DoctrineBehaviors\Provider\UserProvider
The text was updated successfully, but these errors were encountered: