[wp-trac] [WordPress Trac] #50354: Call opcache_invalidate() after saving PHP files in Theme/Plugin editor
WordPress Trac
noreply at wordpress.org
Thu Jun 25 07:13:37 UTC 2020
#50354: Call opcache_invalidate() after saving PHP files in Theme/Plugin editor
----------------------------+------------------------------
Reporter: nextendweb | Owner: mikeschroder
Type: enhancement | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version:
Severity: normal | Resolution: fixed
Keywords: | Focuses:
----------------------------+------------------------------
Changes (by mikeschroder):
* owner: (none) => mikeschroder
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"48160" 48160]:
{{{
#!CommitTicketReference repository="" revision="48160"
Upgrade/Install: Invalidate OPcache for PHP files during updates.
When files are copied into place, check whether opcode invalidation is
available and attempt to invalidate to avoid unintended behavior or fatal
errors from themes, plugins, or core.
Introduces `wp_opcache_invalidate()` to allow safe invalidation of PHP
files from opcode cache, and a filter, `wp_opcache_invalidate_file` to
override the behavior.
Replaces the existing calls to `opcache_invalidate()` in the plugin and
theme editors to use the new function.
Thanks to jnylen0 for porting over a patch from ClassicPress that provided
much of the approach for what is being committed.
Props nigro.simone, dd32, JasWSInc, szepe.viktor, swissspidy, JanR,
asalce, Garavani, pavelevap, pputzer, GregLone, benoitchantre, jadonn,
doc987, kraftbj, Krstarica, jnylen0, nextendweb, williampatton,
ayeshrajans, joostdevalk, stevenkussmaul, boogah, jorbin, mikeschroder.
Fixes #36455, #50354.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50354#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list