[wp-trac] [WordPress Trac] #43583: Introduce new PHP cross-version compat function `is_countable()`

WordPress Trac noreply at wordpress.org
Thu May 10 20:14:24 UTC 2018


#43583: Introduce new PHP cross-version compat function `is_countable()`
-------------------------------------------------+-------------------------
 Reporter:  jrf                                  |       Owner:
                                                 |  SergeyBiryukov
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  4.9.6
Component:  General                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:
  note commit                                    |
-------------------------------------------------+-------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:30 jrf]:
 > I suggest adding a PHPUnit `@requires PHP 5.4` annotation to the
 docblock of the `test_is_countable_ResourceBundle()` unit test to just
 skip the test on PHP 5.3.

 Looks like we don't use the `@requires` annotation anywhere else in the
 suite, and check `PHP_VERSION` instead. Going to do the latter here as
 well for consistency. Would be great look into any previous discussions on
 this when I have a bit more time :)

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


More information about the wp-trac mailing list