user1105787
user1105787

Reputation:

Sonata: The service "security.authentication.manager" has a dependency on a non-existent service "security.user.provider.concrete.fos_userbundle"

I've correctly setup my Admin bundle in Sonata and followed the instructions up to 2.5.

But upon extending I got the error:

ServiceNotFoundException in CheckExceptionOnInvalidReferenceBehaviorPass.php
line 58: The service "security.authentication.manager" has a dependency on
a non-existent service "security.user.provider.concrete.fos_userbundle"."

I recall setting up a service for the Admin bundle, but the documentation does not call for such for the User. Is there something I missed, I've double checked to see if I fat fingered it to no prevail.

I've dumped my kernel, composer, security and config to this pastebin. Seemed like a mouthful to format on here.

Update: This is my service dump on pastebin

Once I removed the extra provider from the security.yaml file I was able to extend and add the ApplicationSonataUserBundle. Now when I visit the /admin/dashboard route it says it doesn't exist even though when i run route:debug command it shows up on there.

Here is the github of my project and here is the log of the new error I'm having when I login via /login: Prod.log

Every time I run php app/console doctrine:schema:update i get the error:

[Doctrine\DBAL\DBALException]
Unknown column type "json" requested. Any Doctrine type that you use has to
be registered with \Doctrine\DBAL\Types\Type::addType(). You can get a list
of all the known types with \Doctrine\DBAL\Types\Type::getTypesMap(). If
this error occurs during database introspection then you might have forgot
to register all database types for a Doctrine Type. Use
AbstractPlatform#registerDoctrineTypeMapping() or have your custom types
implement Type#getMappedDatabaseTypes(). If the type name is empty you might
have a problem with the cache or forgot some mapping information.`

Upvotes: 2

Views: 728

Answers (1)

bastien
bastien

Reputation: 190

For Doctrine Exception you must add a new Type Json

        types:
            json: Sonata\Doctrine\Types\JsonType

mentionned in https://sonata-project.org/bundles/notification/master/doc/reference/installation.html

from config.yml

# Doctrine Configuration
doctrine:
    dbal:
        driver:   "%database_driver%"
        host:     "%database_host%"
        port:     "%database_port%"
        dbname:   "%database_name%"
        user:     "%database_user%"
        password: "%database_password%"
        charset:  UTF8
        types:
            json: Sonata\Doctrine\Types\JsonType

Upvotes: 1

Related Questions