[wp-trac] [WordPress Trac] #47699: Remove redundant JSON polyfills for PHP native functionality

WordPress Trac noreply at wordpress.org
Tue Sep 24 03:02:28 UTC 2019


#47699: Remove redundant JSON polyfills for PHP native functionality
-------------------------------------------------+-------------------------
 Reporter:  jrf                                  |       Owner:  desrosj
     Type:  task (blessed)                       |      Status:  reviewing
 Priority:  normal                               |   Milestone:  5.3
Component:  General                              |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:  coding-
  note close                                     |  standards
-------------------------------------------------+-------------------------

Comment (by dd32):

 I got pinged about this, so I finally wrote a ticket proposing some stat
 collection of PHP extension in use: #48116.

 In general, I'd like to think that `ext/json` is installed on most hosts
 and available by default, but as I recently found out, it's not always a
 given - a Docker image I was running for PHP had it disabled for some
 reason, and I'd not enabled it (WordPress worked, the other app I wanted
 to run didn't).

 > I think a check in the core upgrader for json functions and a rollback
 if they are not available could be a warranted addition.

 Thankfully the upgrade process can be blocked, and so no rollback
 functionality is required, a change to `wp-admin/includes/update-core.php`
 like the following should do the job: https://github.com/dd32/wordpress-
 develop/commit/132e7abab5bfeb81712a51eb91babbdef600216e

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


More information about the wp-trac mailing list