[wp-trac] [WordPress Trac] #55942: Add a "type" field to the meta and options tables

WordPress Trac noreply at wordpress.org
Fri Oct 21 22:11:03 UTC 2022


#55942: Add a "type" field to the meta and options tables
-------------------------------------------------+-------------------------
 Reporter:  azaozz                               |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Database                             |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-      |     Focuses:
  testing                                        |  performance
-------------------------------------------------+-------------------------

Comment (by barry.hughes):

 What do we think about the (optional) ability to specify the underlying
 type, on read as well as upon write?

 For instance, to maintain full backwards compatibility there are surely
 going to be cases where PHP serialization is still required. However, as a
 plugin author, if I can also specify (upon read) that I expect the value
 to be a simple boolean, or to have been written using JSON serialization,
 that would close off scenarios where third party code replaces an option
 with a value requiring PHP serialization (because what would be less
 desirable in such a case is if WP goes ahead and uses `unserialize()` when
 reading that data, contrary to my intentions).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55942#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list