[wp-trac] [WordPress Trac] #36455: Invalidate files in opcode cache after plug-in, theme or core update
WordPress Trac
noreply at wordpress.org
Mon Jun 22 13:47:23 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:
-------------------------------------------+---------------------------
Changes (by mikeschroder):
* keywords: has-patch needs-testing early commit => has-patch needs-
testing early
Comment:
An update:
- During testing before commit, I noticed an issue with `Warning: Zend
OPcache API is restricted by "restrict_api" configuration directive` in
WP-CLI during plugin or core upgrade, even though it is being run from a
folder within `opcache.restrict_api` (and with `opcache.enable_cli`
enabled). Still troubleshooting that. Any testing is appreciated.
- It's tricky to test the `upgrade-core.php` change. I'm still learning
more about the way this works. Do I understand correctly that
`wp_opcache_invalidate()` would not be available, at the very least the
first upgrade around, unless it is inside `upgrade-core.php`? cc: @jnylen0
I'm guessing the second is part of the reason for not having a helper
function in the initial patch, if I'm reading the code properly.
Additional information or testing appreciated.
Replying to [comment:99 nextendweb]:
> WordPress itself might not use it, but plugins and themes might and I'm
sure they do (including myself). It would be better to keep every popular
PHP file extensions to match for the best result, this is why I suggested
the invalidate {{{.php}}} and {{{.phtml}}} files.
I did a couple of searches about this in the plugin and theme repos.
[https://wpdirectory.net/search/01EB68TNXHFCEZZAPC0FF2VQ3Q `phtml`] or
[https://wpdirectory.net/search/01EB695236QGWQGMJA4KE4JX7Q `\.phtml`]
matches in plugins.
[https://wpdirectory.net/search/01EB68SH8NK9TTEX9WWEN8XVTC `phtml`] or
[https://wpdirectory.net/search/01EB69AFWBTF48JM54YPP9R3XQ `\.phtml`]
matches in themes.
I'm sure this is not 100% accurate, but it doesn't seem to be very common
in plugins/themes. Are there other ways or projects that you've been
seeing `.phtml` used a lot?
After chatting with a few folks, I'm leaning towards only including `.php`
initially, with adding `.phtml` if it looks like there were are a lot of
cases missed. I've also
[https://wordpress.slack.com/archives/C60K3MP2Q/p1592574590047500 reached
out] to the WordPress core PHP team for a recommendation.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36455#comment:101>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list