1
votes

In official documentation doctrine say since version 2.6 use json instead json_array. But when i mapping property with type json i get this error

Unknown column type "json" requested. Any Doctrine type that you use has to be registered with \Doctrine\DBAL\Types\Type::addType()

version symfony:

Symfony 3.3.2 (kernel: app, env: dev, debug: true)

part of require composer.json

"doctrine/doctrine-bundle": "^1.6",
"doctrine/orm": "^2.5",  
"symfony/symfony": "3.3.*",

official doctrine dbal repository on github has JsonType in folder Types, i have not this. maybe this is my issue ? then how can i update my doctrine dbal? Maybe who knows how resolve problem.

Or maybe just use json_array? can someone advice

1

1 Answers

2
votes

As stated in JsonType source is available since 2.6 version of Doctrine DBAL. (* @since 2.6). Therefore you need to upgrade your Doctrine in first place.

Doctrine ORM requires DBAL in the same version, so for your version 2.5 of ORM, you also have the same version of DBAL installed as dependency.

You need to upgrade ORM to 2.6 in first place, which will also cause upgrade of DBAL. Then fix deprecation issues.

But since Doctrine ORM 2.6 is not released yet, you may not want to do that know since it may not be stable enough to put it into production.