[buddypress-trac] [BuddyPress Trac] #8163: WP 5.3 use of the spread operator, our PHP required version (5.3) & BP_Walker_Nav_Menu

buddypress-trac noreply at wordpress.org
Thu Nov 21 08:00:17 UTC 2019


#8163: WP 5.3 use of the spread operator, our PHP required version (5.3) &
BP_Walker_Nav_Menu
-----------------------------------+---------------------
 Reporter:  imath                  |       Owner:  (none)
     Type:  defect (bug)           |      Status:  new
 Priority:  high                   |   Milestone:  5.1.0
Component:  Core                   |     Version:  1.7
 Severity:  major                  |  Resolution:
 Keywords:  has-patch 2nd-opinion  |
-----------------------------------+---------------------

Comment (by imath):

 Hi @boonebgorges

 Thanks a lot for your feedback. After running our PHPCS Compat task I
 realized "[https://www.php.net/manual/en/language.oop5.traits.php trait]"
 was introduced in PHP 5.4.

 So I guess the next possibility is to jungle a bit more renaming the class
 that extends `Walker_Nav_Menu` and using the old name to extend the newly
 named class to deal with the `...` operator.

 I believe we should also check for WordPress 5.3 before doing this dance
 as extending `Walker_Nav_Menu` in PHP 5.6 & UP should generate a notice
 error in WordPress < 5.3.

 So I'll run some more tests asap and eventually update the patch.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8163#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list