[wp-trac] [WordPress Trac] #55105: Introduce a polyfill for `array_is_list()`.

WordPress Trac noreply at wordpress.org
Fri Sep 22 21:55:39 UTC 2023


#55105: Introduce a polyfill for `array_is_list()`.
--------------------------------------+-----------------------
 Reporter:  costdev                   |       Owner:  (none)
     Type:  feature request           |      Status:  reopened
 Priority:  normal                    |   Milestone:  6.5
Component:  General                   |     Version:
 Severity:  minor                     |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------
Changes (by SergeyBiryukov):

 * status:  closed => reopened
 * resolution:  maybelater =>
 * milestone:   => 6.5


Comment:

 Replying to [comment:11 costdev]:
 > Yeah, let's close this one as `maybelater` so it can be picked up, with
 unit tests, if use cases are found.

 It is worth noting that polyfills for `array_key_first()` and
 `array_key_last()` were added in [52038] / #45055 even without being used
 by WordPress core.

 I believe the benefit here is pretty much the same as in that ticket:
 > Including a polyfill would allow developers to take advantage of the new
 functions and write consistent code regardless of a site's PHP version.

 Now that WordPress has
 [https://make.wordpress.org/core/handbook/references/php-compatibility-
 and-wordpress-versions/ PHP 8.1 compatibility] (with exceptions), I think
 it's time to reconsider this.

 With 6.4 Beta 1 coming in a few days, moving to 6.5 for discussion.

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


More information about the wp-trac mailing list