Sonata:服务 "security.authentication.manager" 依赖于不存在的服务 "security.user.provider.concrete.fos_userbundle"

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

我已经在 Sonata 中正确设置了我的 Admin 包并遵循了 the instructions up to 2.5

但是在扩展时我得到了错误:

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"."

我记得为管理包设置了一项服务,但文档并未要求为用户提供此类服务。有什么我遗漏的吗,我已经仔细检查过,看看我的胖手指是否没有占上风。

我已将我的内核、作曲家、安全和配置转储到 this pastebin。在这里格式化似乎很麻烦。

更新:这是我的服务转储on pastebin

一旦我从 security.yaml 文件中删除了额外的提供程序,我就能够扩展并添加 ApplicationSonataUserBundle。现在,当我访问 /admin/dashboard 路线时,它说它不存在,即使当我使用 运行 route:debug 命令时它会显示在那里。

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

每次我 运行 php app/console doctrine:schema:update 我得到错误:

[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.`

对于 Doctrine Exception,您必须添加一个新类型 Json

        types:
            json: Sonata\Doctrine\Types\JsonType

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

中提到

来自 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