[wp-trac] [WordPress Trac] #36455: Invalidate files in opcode cache after plug-in, theme or core update

WordPress Trac noreply at wordpress.org
Wed Jun 24 07:38:42 UTC 2020


#36455: Invalidate files in opcode cache after plug-in, theme or core update
-------------------------------------------+---------------------------
 Reporter:  nigro.simone                   |       Owner:  mikeschroder
     Type:  enhancement                    |      Status:  assigned
 Priority:  normal                         |   Milestone:  5.5
Component:  Upgrade/Install                |     Version:
 Severity:  normal                         |  Resolution:
 Keywords:  has-patch needs-testing early  |     Focuses:
-------------------------------------------+---------------------------

Comment (by mikeschroder):

 Verified that WP does seem to use the new `update-core.php` in my tests
 (looks to be copied [https://github.com/WordPress/wordpress-
 develop/blob/master/src/wp-admin/includes/class-core-upgrader.php#L157
 here]), so went ahead and added a check, plus invalidation of the file
 itself, in [attachment:"36455.17.diff"].

 As you mentioned, @nextendweb, it might make sense to consider porting the
 function to `_copy_dir(),` to take advantage of it in *this* upgrade. If I
 understand properly, the benefit would be one core version of invalidation
 (from x.x->5.5) earlier, correct?

 If so, I'm a bit uncomfortable committing to maintaining the function in
 two locations indefinitely for that. Open to ideas/opinions there, for
 sure, though.

 I think this is probably good to go in now as a first pass, but would
 appreciate any review/testing (and insights on automating testing), since
 it's easy to miss things with manual testing, and further knowledge into
 things I might be missing with updates is helpful.

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


More information about the wp-trac mailing list