[wp-trac] [WordPress Trac] #52654: Check and recommend intl extension in Site Health

WordPress Trac noreply at wordpress.org
Fri Sep 10 23:15:20 UTC 2021


#52654: Check and recommend intl extension in Site Health
------------------------------+---------------------
 Reporter:  zodiac1978        |       Owner:  (none)
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  5.9
Component:  Site Health       |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+---------------------
Changes (by jrf):

 * keywords:  has-patch => has-patch commit


Comment:

 Replying to [comment:29 Clorith]:
 > I think this is good to go, are there specific functions we should be
 keeping an eye out for and want to make sure are available that would
 benefit core in the future, or should we start by just checking for the
 extension in general?
 >
 > With backwards compatibility in mind, we would need to add function
 availability checks before using any function that doesn't have a polyfill
 available any way (when/if we get to that point), so it may be enough to
 just look for the extension it self for now, as proposed in
 [attachment:"52654.diff"], what do you think @jrf ?

 @Clorith I agree. For the time being, while Core is not using any of the
 Intl functions yet, nor using the polyfills, checking for the extension
 alone should be sufficient.

 If, at some point in the (hopefully not too far away) future, the first
 uses of Intl functions will be introduced into Core, we can revisit if we
 should make this check more specific.

 Any uses in Core, should, for the foreseeable future, either be
 accompanied by an appropriate polyfill; or be wrapped in functionality
 specific checks, i.e. `function_exists()`/`class_exists()`, rather than
 `extension_loaded()`, and have a fallback if the functionality is not
 available.

 As a side-note: I just checked and the WP Core Docker container already
 ships with the `intl` extension.

 Happy for this patch to go in as is. As it doesn't add any logic, I'm not
 concerned about there not being any tests (though adding more tests for
 the Site Health classes would be nice, but outside of the scope of this
 ticket).

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


More information about the wp-trac mailing list