Lack of interest [Developer Tool] Support json storage for Custom Fields

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

DragonByte Tech

Well-known member
With the efforts to transition from serialized to json for storing arrays in XenForo 2.1, it occurred to me that this might not be entirely possible for Custom Fields, since this would mean all 3rd party add-ons would see their custom fields in a non-workable state until such a time as the author could release an update.

It would be possible to stagger the switch by adding a new option to XF\Behavior\CustomFieldsHolder :: getDefaultConfig:
PHP:
'storage' => 'serialized'
It would then be possible to change the relevant line to
PHP:
'field_value' => is_array($value) ? ($this->config['storage'] == 'serialized' ? serialize($value) : json_encode($value)) : $value
Defaulting to "serialized" would allow developers to update their addons at their own pace without breaking backwards compatibility.
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
Top Bottom