Problem with reading JSON fields in Postgress


(TVX) #1

Hi.
We just started to upgrade Yii2 according the need to upgrade to php 7.3 and we are facing bad problem with array and JSON type automatic decoding from db to php.

We use both arrays and JSON intensively and it is hard to go around the new changes in version 2.0.14.

  1. Suggested workarounds with setting up config don’t work, I supposed nobody tested them as code of php classes have comments about what to do and which variable does what but classes never read the configuration from config array

  2. Automatic decoding of json value to array is problem as we are used to work with json from db as class object everywhere.we store class as json and we take it from db as class again. It makes no sense and only creates errors to convert it to array as you do and back to class as we need

Is there any possibility to override classes for DB layer communication ? I mean create my own column schema and do my own processing of columns read from table? It would help us a LOT.