вторник, 18 декабря 2018 г.

PHP + Mongodb Invalid type specified "object" how to fix

Add to your bundle class in build() method: Type::addType('object', 'Payum\Bridge\Doctrine\Types\ObjectType');

For example:
<?php
namespace Acme\PaymentBundle;

use Doctrine\ODM\MongoDB\Types\Type;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;

class AcmePaymentBundle extends Bundle
{
    public function build(ContainerBuilder $container)
    {
        Type::addType('object', 'Payum\Bridge\Doctrine\Types\ObjectType');
    }
}
This error also occurs if you trying to add mongodb token storage to Payum payment system.

Комментариев нет:

Отправить комментарий