[wp-trac] [WordPress Trac] #56936: Remove bundled theme files from $_old_files

WordPress Trac noreply at wordpress.org
Wed Nov 16 15:31:18 UTC 2022


#56936: Remove bundled theme files from $_old_files
------------------------------+-----------------------
 Reporter:  SergeyBiryukov    |       Owner:  desrosj
     Type:  enhancement       |      Status:  assigned
 Priority:  normal            |   Milestone:  6.2
Component:  Upgrade/Install   |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+-----------------------

Comment (by desrosj):

 I did some more testing before making this update and wanted to detail
 what I found which confirms that these files should be excluded.

 Including bundled theme files in the `$_old_files` list could actually
 break sites when Core is set to auto-update major versions and the theme
 with a file included in the list has auto-updates off.

 The reason is that all files in the list are deleted when Core updates,
 regardless of where they are located. So if an earlier version of the
 theme depends on a file removed in a future version, and that file is
 listed in `$_old_files`, it will be deleted and sites with this theme
 active will potentially break.

 This scenario has thankfully not yet happened because the files that were
 included in this list so far were only license files and SASS files.

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


More information about the wp-trac mailing list