[wp-trac] [WordPress Trac] #59198: Bulk actions "Update" ignores Minimum PHP Version Requirement

WordPress Trac noreply at wordpress.org
Wed Sep 6 20:15:22 UTC 2023


#59198: Bulk actions "Update" ignores Minimum PHP Version Requirement
-----------------------------------------------+----------------------
 Reporter:  salcode                            |       Owner:  costdev
     Type:  defect (bug)                       |      Status:  closed
 Priority:  normal                             |   Milestone:  6.4
Component:  Upgrade/Install                    |     Version:
 Severity:  critical                           |  Resolution:  fixed
 Keywords:  has-patch has-testing-info commit  |     Focuses:
-----------------------------------------------+----------------------

Comment (by costdev):

 @johnbillion Certainly in terms of making the older branches more
 resilient, this could be beneficial to include in the next
 security/maintenance release. However I'm not sure what the criteria is
 for non-security backports.

 Note that:
 - `Plugin_Upgrader::bulk_upgrade()` was introduced in 2.8
 - `Plugin_Upgrader::check_package()` was introduced in 3.3
 - `is_wp_version_compatible()` and `is_php_version_compatible()` were
 introduced in 5.2, so something like these should be used for earlier
 versions:

 {{{
 // WordPress.
 version_compare( explode( '-', $GLOBALS['wp_version'] )[0], $required,
 '>=' );

 // PHP.
 version_compare( PHP_VERSION, $required, '>=' )
 }}}

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


More information about the wp-trac mailing list