Closed flambies closed 2 years ago
You need to require the symfony/security-bundle package before it
Closing as resolved
This is not resolved: I shouldn’t have to require symfony/security-bundle to use the translatable behavior. Services should be conditionally defined.
Feel free to send PR with improvement.
When I'm trying to install DoctrineBehaviors in a fresh symfony 5 install, i get an autowiring error:
In DefinitionErrorExceptionPass.php line 54:
Cannot autowire service "Knp\DoctrineBehaviors\Provider\UserProvider": argu !! ment "$security" of method "__construct()" references class "Symfony\Compon !! ent\Security\Core\Security" but no such service exists.
I could fix this by installing the composer require symfony/security-bundle. I think there might be a missing package in the composer.json or update to the Symfony Security-Core.
Here the full installation :