for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* (c) Kévin Dunglas <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Dunglas\DoctrineJsonOdm\Bundle;
use Doctrine\DBAL\Types\Type;
use Dunglas\DoctrineJsonOdm\Type\JsonDocumentType;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* Doctrine JSON ODM integration with the Symfony framework.
* @author Kévin Dunglas <[email protected]>
final class DunglasDoctrineJsonOdmBundle extends Bundle
{
public function __construct()
if (!Type::hasType('json_document')) {
Type::addType('json_document', JsonDocumentType::class);
}
* {@inheritdoc}
public function boot()
$type = Type::getType('json_document');
$type->setSerializer($this->container->get('dunglas_doctrine_json_odm.serializer'));