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

WordPress Trac noreply at wordpress.org
Wed Sep 6 18:29:14 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:
-----------------------------------------------+----------------------
Changes (by costdev):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"56525" 56525]:
 {{{
 #!CommitTicketReference repository="" revision="56525"
 Upgrade/Install: Check plugin compatibility during bulk upgrades.

 Previously, bulk upgrades did not verify that a plugin package was
 compatible with the site's WordPress version or the server's PHP version.
 This could lead to incompatible updates being installed, causing various
 compatibility issues and errors.

 This change implements the following checks:
 - If available, the API response's `requires` and `requires_php` values
 are checked for compatibility. This saves time, diskspace, memory and file
 operations by failing the upgrade before the package is downloaded and
 unpacked.
 - If the API check passes, the downloaded and unpacked package is verified
 using `Plugin_Upgrader::check_package()` to ensure a plugin file is
 present, and the plugin's "RequiresWP" and "RequiresPHP" headers are
 compatible, if present. This ensures that a mismatch between the API
 response and the plugin file's headers does not cause an incompatible
 plugin to be installed.

 Props salcode, afragen, mukesh27, iammehedi1, zunaid321, johnbillion,
 SergeyBiryukov, costdev.
 Fixes #59198.
 }}}

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


More information about the wp-trac mailing list