[wp-trac] [WordPress Trac] #31982: WordPress PHPUnit Tests should run error free on PHP7 - 4.3 tracking ticket

WordPress Trac noreply at wordpress.org
Thu Apr 16 15:45:51 UTC 2015


#31982: WordPress PHPUnit Tests should run error free on PHP7 - 4.3 tracking ticket
----------------------------+-----------------------------
 Reporter:  jorbin          |       Owner:
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  Future Release
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+-----------------------------

Comment (by jdgrimes):

 Original RFC for this change in PHP:
 https://wiki.php.net/rfc/remove_php4_constructors

 Of particular note:

 {{{
 // function filter is not used as constructor in PHP 5+
 class Filter {
     function __construct() {}

     // PHP 5.0.0 - 5.2.13, 5.3.0 - 5.3.2: E_STRICT "Redefining already
 defined constructor"
     // PHP 5.2.14 - 5.2.17, 5.3.3 - 5.6: No error is raised
     // PHP 7: No error is raised
     // PHP 8: No error is raised
     function filter($a) {}
 }
 }}}

 What this means is that we don't need to remove any of our PHP4
 constructors (yay!). But we do need to make sure that all of the external
 libraries' classes have a `__construct()` defined before a PHP4
 constructor. Some of them do not have a `__construct()` method in addition
 to their PHP4 constructor, and that is what is causing the errors. Note
 that the order in which the constructors appear is important, the PHP5 one
 must come before the PHP4 one.

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


More information about the wp-trac mailing list