[wp-trac] [WordPress Trac] #57345: Bump the minimum required PHP version to 7.2

WordPress Trac noreply at wordpress.org
Mon Dec 26 13:21:14 UTC 2022


#57345: Bump the minimum required PHP version to 7.2
-------------------------------------------------+-------------------------
 Reporter:  SergeyBiryukov                       |       Owner:  (none)
     Type:  task (blessed)                       |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  General                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests 2nd-        |     Focuses:
  opinion                                        |
-------------------------------------------------+-------------------------

Comment (by GaryJ):

 Replying to [comment:45 azaozz]:
 > Replying to [comment:34 SergeyBiryukov]:
 > > maybe we could do this in two steps for versions that are already
 below 5%?
 > >
 > > * Announce dropping PHP 5.6 support in WP 6.2
 > > * Announce dropping PHP 7.0 and 7.1 support in WP 6.3
 >
 > Hmm, that may work but what would be the benefits for the WP users and
 contributors in bumping to PHP 7.0, and then again to 7.2 in few months?

 I'd say that you answered your own question:

 > Still, imho, the best that can be done is to keep trying to convince the
 hosting companies to move WP sites to newer PHP versions.

 As others have elaborated on as well, ''getting the train moving'' with
 that first bump to drop 5.6 would give incentive to the hosting companies
 to make the moves necessary (which in turn help users with performance and
 security, and contributors with new features, syntaxes and alignment with
 the rest of the PHP world), and not just to 7.0, especially if combined
 with:

 > Or perhaps can try to come up with a schedule that tries to predict when
 the number of sites would fall under 5% and pre-announces the bumps (look
 at trends, etc.)?

 Makes sense. I believe that a roadmap of incremental bumps would actively
 help move the percentages in favourable directions, more than just the
 efforts related to the "keep trying" aspect of your statement. Holding
 back 95% of software consumers because of admirably wanting to support the
 5% and being beholden to the hosting companies' business decisions doesn't
 seem to take ownership of the problem.

 > Frankly not seeing any significant
 [https://www.php.net/manual/en/migration70.new-features.php new features
 in PHP 7.0] that would help the WP codebase much.

 That isn't a reason not to make the move. Moving to PHP 7.0 minimum opens
 the door for the incremental move after that, and the one after that. It
 allows plugin and theme authors to have more confidence that they aren't
 leaving a proportion of their target audience behind for their PHP 7.x
 extension when core is still on 5.6.

 7.0 introduces scalar and return types, and although WP core has generally
 been lax and uses type casting/conversions, it would allow a future where
 WP core was more strictly typed (at least for newly introduced code),
 which would reduce bugs in WP core and extensions.

 I'd happily support Sergey's proposal - we've got to a point where a WP
 upgrade isn't an issue for users anymore with auto-updates, and I'd love
 to see the incremental approach so it means that minimum PHP bumps are a
 non-event for hosts and users and extension authors as well.

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


More information about the wp-trac mailing list