fix(entity): Fix mapping of old/sub-types to actually supported datab…#48837
Conversation
| * @since 7.0.0 | ||
| */ | ||
| protected function addType(string $fieldName, string $type): void { | ||
| if (in_array($type, ['bool', 'double', 'int', 'array', 'object'], true)) { |
There was a problem hiding this comment.
shall we document those to satisfy psalm? Or yolo?
There was a problem hiding this comment.
So the options are this, right?
- Document and make it somewhat official by doing so
- yolo and apps have to baseline or use the types from the constants
I would prefer to fix the apps (so 2), but not sure if this is too much effort and I do not want to make all devs angry...
There was a problem hiding this comment.
Added a @since entry to the method to explain it, together with a psalm-suppress.
We could backport the setter() change, to make sure using Types::TEXT and the others works also on stable branches. But then the apps would have to depend on a specific patch release or still need a version switch.
So for now I would say they will have to use the psalm baseline until they dropped support for everything < 31 and then move to Types?
6c86492 to
0864428
Compare
Unless you migrate to the new consts psalm will stay red, but yeah same issue in talk |
0864428 to
8810d78
Compare
8810d78 to
f973616
Compare
…ase types Signed-off-by: Joas Schilling <coding@schilljs.com>
f973616 to
54c3aa3
Compare
…ase types
Checklist