1

I try to install Sonata User Bundle but I have a problem on configuration when I execute the command

app/console sonata:easy-extends:generate SonataUserBundle -d src

The git bash show this error :

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

2 Answers 2

8

In your configuration, you must have the following :

# app/config/sonata/user.yml or app/config/config.yml
fos_user:
    db_driver:      orm # can be orm or odm
    firewall_name:  main
    user_class:     FOS\UserBundle\Entity\User     #Default configuration
    # ...
    group:
        group_class:   FOS\UserBundle\Entity\Group
        group_manager: sonata.user.orm.group_manager

You can replace FOSUserBundle entities by your own.

Sign up to request clarification or add additional context in comments.

Comments

0

You must install and configure the FOSUserBundle because SonataUserBundle is a bundle for integrate FOSUserBundle into a SonataProject.

You can read this installation doc for understand : SonataUserBundle Install

Did you notice the FosUserBundle into your AppKernel.php file like this :

public function registerbundles()
{
    return array(
        new Sonata\CoreBundle\SonataCoreBundle(),
        new Sonata\BlockBundle\SonataBlockBundle(),
        new Sonata\EasyExtendsBundle\SonataEasyExtendsBundle(),
        // ...
        // You have 2 options to initialize the SonataUserBundle in your AppKernel,
        // you can select which bundle SonataUserBundle extends
        // Most of the cases, you'll want to extend FOSUserBundle though ;)
        // extend the ``FOSUserBundle``
        new FOS\UserBundle\FOSUserBundle(),
        new Sonata\UserBundle\SonataUserBundle('FOSUserBundle'),
        // OR
        // the bundle will NOT extend ``FOSUserBundle``
        new Sonata\UserBundle\SonataUserBundle(),
        // ...
    );
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.