我在Sonata中正确设置了我的管理员工具包,然后点了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"."
我记得为Admin软件包设置了一项服务,但文档并未要求用户提供此类服务。有没有我错过的东西,我已经仔细检查过,看看我是否发胖,但没有占上风。
我已将我的内核,编写器,安全性和配置转储到this pastebin。看起来就像在这里格式化一样。
更新:这是我的服务转储on pastebin
一旦我从security.yaml
文件中删除了额外的提供程序,我就可以扩展并添加ApplicationSonataUserBundle
。现在,当我访问/admin/dashboard
路线时,它表示它不存在,即使我运行route:debug
命令它也会显示在那里。
Here is the github of my project以下是我通过/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.`
答案 0 :(得分:1)
对于Doctrine Exception,您必须添加一个新的Type 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