[wp-trac] [WordPress Trac] #56057: Add conditional to WP_Upgrader::install_package() for Rollback testing

WordPress Trac noreply at wordpress.org
Sun Jun 26 12:35:44 UTC 2022


#56057: Add conditional to WP_Upgrader::install_package() for Rollback testing
-----------------------------+-----------------------------
 Reporter:  afragen          |       Owner:  SergeyBiryukov
     Type:  feature request  |      Status:  closed
 Priority:  normal           |   Milestone:  6.1
Component:  Upgrade/Install  |     Version:  trunk
 Severity:  normal           |  Resolution:  fixed
 Keywords:  has-patch early  |     Focuses:
-----------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"53578" 53578]:
 {{{
 #!CommitTicketReference repository="" revision="53578"
 Upgrade/Install: Add a conditional to facilitate testing of the Rollbacks
 feature project.

 The [https://make.wordpress.org/core/2021/02/19/feature-plugin-rollback-
 update-failure/ Rollback Update Failure feature project] creates a
 temporary backup of plugins and themes before updating. This aims to make
 the update process more reliable and ensure that if a plugin or theme
 update fails, the previous version can be safely restored.

 If the [https://wordpress.org/plugins/rollback-update-failure/ Rollback
 Update Failure plugin] is installed, `WP_Upgrader::install_package()` will
 use the `move_dir()` function from there for better performance. Instead
 of copying a directory from one location to another, it uses the
 `rename()` PHP function to speed up the process, which is instrumental in
 creating a temporary backup without a delay. If the renaming failed, it
 falls back to `copy_dir()` WP function.

 This conditional aims to facilitate broader testing of the feature. It is
 temporary, until the plugin is merged into core.

 Props afragen, pbiron, costdev, davidbaumwald, audrasjb, jrf,
 SergeyBiryukov.
 Fixes #56057. See #51857, #54166.
 }}}

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


More information about the wp-trac mailing list