-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove object-cache.php
hack
#533
Conversation
@joemcgill @mukeshpanchal27 Do you perhaps more context on this whole early initialization thing with this |
@swissspidy I found #42, where it was introduced and discussed why it was added. Hope this helps to get more context. |
Due to the nature of how Plugin Check needs to work, only other way to load super early would be to WordPress Core should just add support for a new drop-in: Plugin Check is the type of library that drop-in plugins are designed to accommodate; intentionally forked loading paths. Every existing drop-in overrides a low-level API or traps a related low-level problem, and it is an easy argument to make that Plugin Check has similarly low-level requirements. Naming it something like I suggested above would also set the expectation to everyone that its usage is reserved, and if that file already exists it had better be compatible with Plugin Check, the same way all |
I like the |
This issue came here also. #543 😟 |
Closing for now, can be revisited later |
Found out in #518 that this
object-cache.php
drop-in prevents other plugins from adding custom checks that can then be run via CLI.From what I can see,
object-cache.php
is used as a "hook" to short-circuit regular WordPress loading order and manually execute the PCP CLI command before WordPress has fully loaded. That also means before any plugins have actually loaded...This "hack" appears to be used so we can perform runtime checks for a plugin without the plugin having to be active on the site. If we can simply make this a requirement for the plugin to be active, then we can simplify this a lot.
I do lack full context though on why this was implemented this way, so appreciate any feedback.
Related: