[wp-trac] [WordPress Trac] #57386: Add filter to WP_Upgrader::install_package for copy_dir()

WordPress Trac noreply at wordpress.org
Fri Jan 6 23:07:56 UTC 2023


#57386: Add filter to WP_Upgrader::install_package for copy_dir()
-----------------------------+--------------------------
 Reporter:  afragen          |       Owner:  (none)
     Type:  feature request  |      Status:  reopened
 Priority:  normal           |   Milestone:  6.2
Component:  Upgrade/Install  |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:  performance
-----------------------------+--------------------------

Comment (by afragen):

 Replying to [comment:19 peterwilsoncc]:
 > Replying to [comment:17 afragen]:
 > > In terms of who this affects, [https://community.oracle.com/tech/apps-
 infra/discussion/comment/14522583/#Comment_14522583  Oracle does not
 support VirtualBox for production]. While it's possible to use it for
 hosting, I don't think that we should support what Oracle doesn't. This
 means it will only affect development environments using VirtualBox, who
 have chosen to use the filter, so a small portion of a small portion of a
 small portion of users.
 > >
 > > Some more background on the VirtualBox issue.
 > > https://www.virtualbox.org/ticket/8761#comment:24
 > > https://www.virtualbox.org/ticket/17971
 >
 > I think this conclusion is incorrect. VitualBox users should not have to
 make any changes to work around core.
 >
 > MAMP, WAMP, VirtualBox and other developer environments are not
 recommended in hosting environments but are all suitable for local
 development environments.
 >
 > WordPress.com VIP provide guides for two VB based development
 environments, [https://docs.wpvip.com/how-tos/third-party-local-
 development/ Chassis] and [https://docs.wpvip.com/how-tos/local-
 development/set-up-vvv/ VVV]. Altis DXP also provides a [https://docs
 .altis-dxp.com/local-chassis/ VB based local environment].
 >
 > The intended workflow for these is to upgrade themes and plugins
 locally, test and then push to production. If updating locally is
 unavailable to users of these platforms without a plugin it's a bug, not a
 feature.

 The above section by me a response to @azaozz about his following
 statement.

 > 2. Looking at #57375 and the new move_dir() function, why would WP need
 a filter to use it if it is better/faster, and has been tested
 sufficiently?

 I was pointing out why the default state of the filter should use
 `copy_dir()`. If the logic in the filter does not respect this logic
 please let me know. I've been on night call for the past week, my
 apologies if I got the logic reversed. The intent is for those wishing to
 use `move_dir()` to opt-in and need to use the filter.

 I plan on adding a canonical plugin to the plugin repository for this to
 make is simpler. We are currently working on something to this plugin to
 let VB users also use `move_dir()` if they too opt-in.

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


More information about the wp-trac mailing list