Doctrine orm 未知的数据库类型enum请求了orm Silex

Doctrine orm 未知的数据库类型enum请求了orm Silex,doctrine-orm,silex,Doctrine Orm,Silex,将Silex与一起使用时,我在尝试运行orm:convert映射时收到错误消息: Fatal error: Uncaught exception 'Doctrine\DBAL\DBALException' with message 'Unknown database type enum requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it.' 条令没有管理枚举 在您的$app->register(新的Dflyde

将Silex与一起使用时,我在尝试运行orm:convert映射时收到错误消息:

Fatal error: Uncaught exception 'Doctrine\DBAL\DBALException' with message 'Unknown database type enum requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it.'

条令没有管理枚举

在您的
$app->register(新的Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvider(),数组(…

只需注册一个新的类型映射:

$app['orm.em']->getConnection()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
它将解决这个问题