我在我的 Symfony 2 应用程序上安装了几个 Sonata 包(用户、管理员等),但在使用了一段时间后,我决定我不喜欢它们并想删除它们。
我更新了我的 composer.json 和 AppKernel.php 文件,删除了与 Sonata 相关的任何内容。我还删除了所有相关的路由、配置和安全文件条目。但是,我现在无法更新我的数据库架构。
每当我运行一个错误时,我都会收到以下错误:
[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 lis
t of all the known types with \Doctrine\DBAL\Types\Type::getTypeMap(). If t
his error occurs during database introspection then you might have forgot t
o register all database types for a Doctrine Type. Use AbstractPlatform#reg
isterDoctrineTypeMapping() or have your custom types implement Type#getMapp
edDatabaseTypes(). If the type name is empty you might have a problem with
the cache or forgot some mapping information.
我知道这是来自 Sonata 捆绑包之一的 Doctrine 配置:
# 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
如您所见,我已对此进行了评论,但我仍在继续收到错误消息。
我无法追踪仍然引用它的位置。