I am trying to create clean new project using newest lts version of Symfony and I have this problem installing FOSUserBundle:
I don’t get it, why this simple config doesn’t work?
I found tutorials showing the same working, but on Symfony 4.0
Way to reproduce:
composer self-update
symfony new s44_project --full --version=lts
cd s44_project
composer require friendsofsymfony/user-bundle
I’m using PHP 7.4 to run cli commands
2
Answers
It seems to be a temporary problem, since FOSUserBundle isn't compatible with twig version 3 yet.
The solution is to limit twig version to <3.0
Than install and configure FOSUserBundle, use
php bin/console cache:clear
a lot.You can upgrade to the
nucleosuser-bundle
which is a fork of the FOSUserBundle with Symfony 4 and 5 support:https://docs.nucleos.rocks/projects/user-bundle/en/2.0.x/migrate_from_fos.html