Reputation: 51
I have a question whichone version should I use? I started with Symfony 3.4 LTS which requires FOSUserBundle ^2.0. To use SonataUserBundle with FOSUserBundle I need to use ^4.0. In 4.0 there's no user profile things. I need to implement them all or I missed something?
Upvotes: 1
Views: 1038
Reputation: 54
To use SonataUserBundle 4.x with Symfony 3.4 (and more specifically PHP 5.6/7.0), you can use "runroom/sonata-user": "4.x-dev"
(see https://github.com/Runroom/SonataUserBundle), which is a fork of one of Sonata's team member to restore PHP 5.6/7.0 compatibility for SonataUserBundle.
Upvotes: 0
Reputation: 863
There are only one way to use SonataUserBundle of version 4.x-dev but... with special commit reference (3dd68a6aae95cffe6a4275d68c27d2766d8b93f7) and FosUserBundle of version 2.0.1. I know for sure, that this works for Symfony 3.3.2
Here is example of composer.json and composer.lock:
Composer.json
"require": {
...
"friendsofsymfony/user-bundle": "v2.0.1",
...
"sonata-project/admin-bundle": "3.18.2",
"sonata-project/doctrine-orm-admin-bundle": "3.1.4",
"sonata-project/user-bundle": "4.x-dev",
...
"symfony/symfony": "^3.3.2",
...
},
Compose.lock (sonata user bundle part)
{
"name": "sonata-project/user-bundle",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/sonata-project/SonataUserBundle.git",
"reference": "3dd68a6aae95cffe6a4275d68c27d2766d8b93f7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sonata-project/SonataUserBundle/zipball/3dd68a6aae95cffe6a4275d68c27d2766d8b93f7",
"reference": "3dd68a6aae95cffe6a4275d68c27d2766d8b93f7",
"shasum": ""
},
...
Upvotes: 1