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

WordPress Trac noreply at wordpress.org
Tue Oct 18 20:37:49 UTC 2022


#56057: Add conditional to WP_Upgrader::install_package() for Rollback testing
-----------------------------+-----------------------------
 Reporter:  afragen          |       Owner:  SergeyBiryukov
     Type:  task (blessed)   |      Status:  reopened
 Priority:  normal           |   Milestone:  6.2
Component:  Upgrade/Install  |     Version:  6.1
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+-----------------------------

Comment (by SergeyBiryukov):

 In [changeset:"54643" 54643]:
 {{{
 #!CommitTicketReference repository="" revision="54643"
 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.

 Follow-up to [53578], [54484].

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

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


More information about the wp-trac mailing list