Michał Moskal
Michał Moskal

Reputation: 11

FOSUserBundle and Symfony 4.4.2 (lts) Problem

I am trying to create clean new project using newest lts version of Symfony and I have this problem installing FOSUserBundle:

https://pastebin.com/bYYdY40E

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

Upvotes: 1

Views: 1438

Answers (2)

crmpicco
crmpicco

Reputation: 17181

You can upgrade to the nucleos\user-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

Upvotes: 1

Michał Moskal
Michał Moskal

Reputation: 11

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

composer unpack twig-pack
composer require "twig/twig:2.*"

Than install and configure FOSUserBundle, use php bin/console cache:clear a lot.

Upvotes: 0

Related Questions