Symfony 5, I write my User entity code accordingly with:
https://symfony.com/doc/current/security.html#denying-access-roles-and-other-authorization
and I use mariadb
public function getRoles(): array
{
$roles[] = $this->roles;
// guarantee every user at least has ROLE_USER
$roles[] = 'ROLE_USER';
return array_unique($roles);
}
and I added manually an user with role ROLE_ADMIN.
I don't understand why it returns the error:
Could not convert database value "ROLE_ADMIN" to Doctrine Type json