Conversation
ca9b29a to
c9bfedb
Compare
This was referenced Sep 18, 2020
76e1d85 to
70d34fd
Compare
e7d603c to
a4b0d85
Compare
7fcf3bc to
181d4ec
Compare
31b600d to
7cd48e5
Compare
53b09c3 to
cc0d0e6
Compare
7cd48e5 to
9a9e6f1
Compare
cc0d0e6 to
524dc9c
Compare
9a9e6f1 to
87be248
Compare
mvorisek
commented
Oct 13, 2020
2 tasks
524dc9c to
50a0f79
Compare
87be248 to
8bfebca
Compare
50a0f79 to
9aca684
Compare
5e853c9 to
5ee9f91
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If a custom typecasting is needed, easy, simply register own type in DBAL. If a library wants to provide some custom types by default, bootstrap (register on load time) using composer.
I think this is step in a good direction, as we can then leave all typecasting to standard DBAL Types and remove all hacky typing from the code. DBAL Types can also be easily replaced and/or a new/custom Type can be easily added.
BC breaks:
Field::serializeproperty, to use PHP serialization, useobjecttype.Field::typecastproperty, to use a custom typecasting, extend the target DBAL type class and register it or implement a custom persistenceField::dateTimeClass/dateTimeZoneClassproperties, see bullet point aboveremovedField::persist_format/persist_timezoneproperties, see above, but you probably want to handle it using persistence/UI solely - if there was a shared format/TZ, different format/TZ was not possible to set for the database and UIModel::strict_typesproperty, was already enabled by default, normalization can still be disabled/broken byModel::HOOK_NORMALIZEhookarraytype is temporary forbidden to be used,objecttype now serializes data using PHP serialization, to use JSON, usejsontype. For more details, see the following table:arrayjsonarraytype now behaves differently, thus temporary forbidden to be used in atk4/dataobjectjsonField::serializeflag was neededobjectField::serializeflag was neededarrayobjecttype instead