Sylius / PluginSkeleton

Skeleton for starting Sylius plugins.
https://sylius.com/plugins/
73 stars 64 forks source link

Unknown column type "json_array" requested #298

Closed onalekitso closed 2 years ago

onalekitso commented 2 years ago

if i execute APP_ENV=test bin/console doctrine:schema:create i get the below error and im using v1.10.0-ALPHA.1

Unknown column type "json_array" requested. Any Doctrine type that you use has to be registered with \Doctrine\DBAL\Types\Type::addType(). You can get a list of all the known types with \Doctr
ine\DBAL\Types\Type::getTypesMap(). If this error occurs during database introspection then you might have forgotten to register all database types for a Doctrine Type. Use AbstractPlatform#re
gisterDoctrineTypeMapping() or have your custom types implement Type#getMappedDatabaseTypes(). If the type name is empty you might have a problem with the cache or forgot some mapping informat
ion.

Please help

RafalJanikIndusti commented 2 years ago

Hi, I have the same issue like @onalekitso Any new in topic? Have you solve your problem?

RafalJanikIndusti commented 2 years ago

Solved with command: composer require doctrine/dbal:"^2.6"

onalekitso commented 2 years ago

Thanks, now i'm stuck here...

APP_ENV=dev bin/console server:run -d public. I get the below

Command "server:run" is not defined.

Did you mean one of these?
dbal:run-sql
server:dump
server:log

RafalJanikIndusti commented 2 years ago

Yup. Please install symfony: https://symfony.com/download

and then: symfony server:start

GSadee commented 2 years ago

I'm closing the issue as the problem with dbal should be already fixed in the newest version of Sylius: https://github.com/Sylius/Sylius/commit/cb7cac8788cf2d4cd4453bff82ad5e01baf21733. Feel free to reopen if it still occurs 😃

demoniqus commented 2 years ago

In my case a problem was into database table. The column contained a comment "(DC2Type:json_array)". When phpunit had read this comment it used it to define the column type. But because phpunit use doctrine/dbal v.3.*** where json_array type is deprecated and removed phpunit generated the exception (see class MySQLSchemaManager, method _getPortableTableColumnDefinition)