for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the FreshDoctrineEnumBundle
*
* (c) Artem Genvald <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Fresh\DoctrineEnumBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* FreshDoctrineEnumBundle.
* @author Artem Genvald <[email protected]>
class FreshDoctrineEnumBundle extends Bundle
{
* {@inheritdoc}
public function boot()
parent::boot();
$databasePlatform = $this->container->get('doctrine.dbal.default_connection')->getDatabasePlatform();
if (!$databasePlatform->hasDoctrineTypeMappingFor('enum') || 'string' !== $databasePlatform->getDoctrineTypeMapping('enum')) {
$databasePlatform->registerDoctrineTypeMapping('enum', 'string');
}