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

WordPress Trac noreply at wordpress.org
Fri Jul 19 10:31:55 UTC 2019


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

 * keywords:  has-patch has-unit-tests needs-refresh needs-dev-note => has-
     patch has-unit-tests needs-dev-note


Comment:

 > For now, I'm going to start with refreshing the WP 5.3 patch and adding
 a separate patch for WP 5.2 Site Health.

 4 new patches for this have now been uploaded.

 I've basically split the original patches based on the separate decision
 points involved:
 * WP 5.2.x: make JSON a required extension for Site Health
 * WP 5.3: agressively deprecate the `class-json.php` file, deprecated the
 `Services_JSON` and the `Services_JSON_Error` classes
 * WP 5.3: remove any and all work-arounds in WP Core which were in place
 for the JSON extension potentially not being available/for JSON in PHP <
 5.6.
 * WP 5.3: remove the actual poyfills

 Passing build for the WP 5.3 patches: https://travis-ci.com/WordPress
 /wordpress-develop/builds/119772721

 ''**What's missing is the WP 5.2.x patch to prevent updating WP Core to
 the next major when the JSON extension is missing, but I'd like to receive
 a little more input before I create that patch.**''

 > I've just been looking at this, but I haven't been able to find any such
 existing check yet for required extensions, though I may be looking in the
 wrong place.
 >
 > If it doesn't exist yet, it would need to be added and it would be
 useful if we could re-use the list of required extensions as contained in
 the WP_Site_Health::get_test_php_extensions() method.

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


More information about the wp-trac mailing list