public function boot() { $type = Type::getType('json_document'); $type->setSerializer($this->container->get('dunglas_doctrine_json_odm.serializer')); }