Reputation: 17899
When using Silex with dflydev-doctrine-orm-service-provider I've got the error message when trying to run orm:convert-mapping :
Fatal error: Uncaught exception 'Doctrine\DBAL\DBALException' with message 'Unknown database type enum requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it.'
Doctrine didn't manage enum ?
Upvotes: 1
Views: 723
Reputation: 17899
After your $app->register(new Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array(...
just register a new TypeMapping :
$app['orm.em']->getConnection()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
It will solve the issue.
Upvotes: 1