Property App\Entity\User::$foobars type mapping mismatch: backing type string of enum App\Enums\Foobar does not match value type mixed of the database type array|bool|float|int|JsonSerializable|stdClass|string|null.
🪪 doctrine.enumType
If I switch to Types::SIMPLE_ARRAY, no error anymore.
With Doctrine, we can define an array of enum as a json array column using
Types::JSON
withenumType
option.This result in the following phpstan error:
If I switch to
Types::SIMPLE_ARRAY
, no error anymore.I guess the rule does not handle json array yet.