Search code examples
fosuserbundlesonatasonata-user-bundle

SonataUserBundle and Symfony 3.4


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?


Solution

  • 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": ""
            },
     ...