-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(entity): Fix mapping of old/sub-types to actually supported datab… #48837
fix(entity): Fix mapping of old/sub-types to actually supported datab… #48837
Conversation
@@ -263,6 +272,17 @@ public function getUpdatedFields(): array { | |||
* @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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we document those to satisfy psalm? Or yolo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this in quickly please 🙏 Thanks!
CI is red in all Groupware apps and we are kind of blocked until a decision is made on this.
EDIT: Or we simply migrate to 'integer'
which shouldn't be breaking anything, right?
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