Open julienfalque opened 4 years ago
Yeah, the message needs to be fixed but what's PHPStan telling you is that when you manually enter 4
into the database, your model is broken.
True, but I don't see a more suitable native Doctrine DBAL type for this example. Would a custom type mapping to e.g. ENUM
be supported?
Yes, would be better to have a custom Doctrine type with the correct return typehints for convertToPHPValue/convertToDatabaseValue. It's a matter of custom DoctrineTypeDescriptor on what phpstan-doctrine thinks about your types...
With the property:
The following error is reported: