Review main Merged

76553[FEATURE] Introduce native JSON database field type support

Stefan Bürk CR +2 V +2 Hard +510 −133 updated 11/22/22, 21:42

Commit message

The patch adds native JSON database field type.

This allows to define a JSON database field in extension
`ext_tables.sql` files, example:

CREATE TABLE tx_myextension_domain_model_book (
    title varchar(200) DEFAULT '',
    contents json
);

The methods `insert()`, `bulkInsert()` and `update()` in
class `\TYPO3\CMS\Core\Database\Connection` now
convert provided data values to their database counterpart
as define by doctrine/dbal. For json fields, values can be
provides as array and will be automatically json_encode()'ed.

The patch:
* Ensures php to database value conversion in fascade connection
  methods `insert()`, 'bulkInsert()` and `update()`
* Map JSON type from ext_tables.sql to doctrine/dbal JSON Type
* Remove platform specific automatic type determination in core
  DataHandler due to generic handling in Connection fascade class
* doctrine/dbal DateTimeType, DateType and TimeType are overriden
  to allow string as php value for converting to database

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 17