[wp-trac] [WordPress Trac] #42264: Systematic way of dealing with compat code and polyfills
WordPress Trac
noreply at wordpress.org
Thu Aug 15 15:42:33 UTC 2024
#42264: Systematic way of dealing with compat code and polyfills
----------------------------+------------------------------
Reporter: schlessera | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bootstrap/Load | Version:
Severity: normal | Resolution:
Keywords: close | Focuses: performance
----------------------------+------------------------------
Changes (by jorbin):
* keywords: => close
* focuses: => performance
Comment:
During the most recent PHP version upgrade, only
[https://core.trac.wordpress.org/changeset/57985 one function and two
constants were able to be removed].
Taking a look at the current state of the file:
1. 3 constants tied to specific PHP Versions
2. 7 Functions tied to specific PHP Versions
3. 5 Functions tied to PHP Extentions
4. 5 internal helper functions
5. 1 check if `sodium_compat` should be loaded.
At this point, I think that updating the file . Unless there are specific
performance improvements that can be identified by reorganizing to do
separate includes, I think the maintenance burden hasn't been too much
thus far and doesn't appear to be a need on the horizon that will expand
this burdon.
Adding the `close` keyword since I think this might be best as
`maybelater` depending on how this function grows. Adding the performance
keyword in case someone wants to run some performance tests but I suspect
it's a micro optimization at best.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42264#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list