Could not convert database value to Doctrine Type json

1

I`m new user of Symfony 4 framework and i wish to build a correct login system using built-in auth system. However, i got an error while doctrine query. Here is my screenshot:

Picture of error

And here is my migration of database:

$this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, 
email VARCHAR(180) NOT NULL, 
roles TEXT NOT NULL, 
password VARCHAR(255) NOT NULL, 
UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), 
PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');

Should I change type of "roles" property to Json?

NoLimes

Posted 2019-01-22T20:00:00.683

Reputation: 21

No answers