Sonata-User: The service "sonata.user.orm.group_manager" has a dependency on a non-existent parameter "fos_user.model.group.class"

5,768 views
Skip to first unread message

vannoo67

unread,
Feb 13, 2014, 8:53:09 PM2/13/14
to sonata...@googlegroups.com
Yesterday's commit "Added User & Group API" broke something for me.

When I do `php composer.phar update`, I get the following error message;


  [Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]
  The service "sonata.user.orm.group_manager" has a dependency on a non-existent parameter "fos_user.model.group.class". Did you mean this: "fos_user.model.user.class"?


This is what my composer.json looks like;
-------------------------------------------------------------------------------------------------------------------------------------------------------
{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.4.*",
        "symfony/yaml": "2.4.*",
        "doctrine/orm": ">=2.2.3,<2.4-dev",
        "doctrine/doctrine-bundle": "1.2.*",
        "twig/extensions": "1.0.*",
        "symfony/assetic-bundle": "2.3.*",
        "symfony/swiftmailer-bundle": "2.3.*",
        "symfony/monolog-bundle": "2.3.*",
        "sensio/distribution-bundle": "2.3.*",
        "sensio/framework-extra-bundle": "2.3.*",
        "sensio/generator-bundle": "2.3.*",
        "incenteev/composer-parameter-handler": "~2.0",
        "doctrine/migrations": "dev-master",
        "doctrine/doctrine-migrations-bundle": "dev-master",
        "doctrine/doctrine-fixtures-bundle": "dev-master",
        "stof/doctrine-extensions-bundle": "~1.1@dev",
        "khepin/yaml-fixtures-bundle": "~0.8.1",
        "sonata-project/core-bundle": "dev-master",
        "sonata-project/admin-bundle": "dev-master",
        "friendsofsymfony/user-bundle": "1.3.2",
        "sonata-project/user-bundle": "dev-master", 
        "sonata-project/doctrine-orm-admin-bundle": "dev-master",
        "sonata-project/media-bundle": "dev-master",
        "egeloen/ckeditor-bundle": "2.*",
        "vich/uploader-bundle": "dev-master",
        "KnpLabs/Gaufrette": "dev-master",
        "knplabs/knp-gaufrette-bundle" : "dev-master",
        "gregwar/captcha-bundle": "dev-master",
        "antimattr/google-bundle": "dev-master",
        "liip/imagine-bundle": "dev-master",
        "igorw/file-serve-bundle": "1.0.*",
        "helios-ag/fm-elfinder-bundle": "1.*",
        "mopa/bootstrap-bundle": "dev-master",
        "twbs/bootstrap": "dev-master"
    },
    "scripts": {
        "post-install-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Mopa\\Bundle\\BootstrapBundle\\Composer\\ScriptHandler::postInstallSymlinkTwitterBootstrap"
        ],
        "post-update-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Mopa\\Bundle\\BootstrapBundle\\Composer\\ScriptHandler::postInstallSymlinkTwitterBootstrap"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "minimum-stability": "stable",
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "symfony-assets-install": "symlink",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "2.3-dev"
        }
    }
}
-------------------------------------------------------------------------------------------------------------------------------------------------------


I have tried playing around with the version string for "friendsofsymfony/user-bundle", with no joy. (I see on packagist.org that there's a 2.0 branch, This doesn't work for me either)

Any suggestions?

Cheers,
Jon


Julian Vieser

unread,
Feb 16, 2014, 3:49:04 PM2/16/14
to sonata...@googlegroups.com
I have the same problem. Did you solve it ? 

vannoo67

unread,
Feb 17, 2014, 12:13:02 AM2/17/14
to sonata...@googlegroups.com
Not yet. I doubt that I can without help from Thomas 

Gabriel Richards

unread,
Feb 17, 2014, 12:30:09 AM2/17/14
to sonata...@googlegroups.com
I'm having the same error message.

G

Gabriel Richards

unread,
Feb 17, 2014, 12:46:28 AM2/17/14
to sonata...@googlegroups.com
OK, well I just fixed it... I wasn't really using groups in my admin, hadn't configured the group_class in my config.yml

Added this in config.yml:

fos_user:

    group:
      group_class: Path\To\My\Entity\Group

G


On Sunday, February 16, 2014 9:13:02 PM UTC-8, vannoo67 wrote:

vannoo67

unread,
Feb 19, 2014, 8:49:42 PM2/19/14
to sonata...@googlegroups.com
Thanks Gabriel,

much appreciated.

I re-checked the sonata-users docs and sure enough they now say ...

fos_user:

    group:
        group_class: Application\Sonata\UserBundle\Entity\Group

Cheers,
Jon

Mouhamadou SEYE

unread,
Feb 16, 2015, 11:11:28 AM2/16/15
to sonata...@googlegroups.com
Thank so much !
Reply all
Reply to author
Forward
0 new messages