-
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
CLI: object-cache.php
drop-in prevents extension usage
#555
Comments
object-cache.php
prevents consecutive CLI commands run as expectedobject-cache.php
drop-in prevents extension usage
This isn't really about running commands twice. It's about the drop-in flipping the execution order on its head, thus preventing any other plugins from hooking into PCP. It just so happens that when you run the command and the drop-in doesn't exist yet, it will be created, but it won't affect the loading order until next time. |
I am wondering what would be the fix for this. We could remove use |
Well I was hoping we can just remove this drop-in completely, not just for CLI but everywhere (see #533). If you want to execute runtime checks, the plugin would simply need to be already active. I think that's a reasonable tradeoff. |
Yah. That approach is also good. It would be great if we could gather other reviews in that PR as this issue is blocking other PRs also. |
cc @felixarntz @mukeshpanchal27 @joemcgill for thoughts Here's what this is about: We want to make it possible for the plugins team and others to create add-ons to Plugin Check that provide additional checks. #518 aimed to add a test demonstrating that this works, only it doesn't! The problem is, 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. In my opinion, this additional complexity not only prevents such add-ons from working, it's also simply not worth the maintenance nightmare. We can simply make it a requirement for the plugin to be active in order to perform runtime checks. Then we can simplify this a lot. That said, I do lack full context though on why this was implemented this way, so appreciate any feedback. |
This is definitely something we need to address. However, I don't think that removing the
It's not that simple. It's mostly to prevent the runtime checks from messing with the actual site content or functionality, by working in a separate set of database tables (similar to how e.g. the WP unit tests do). I acknowledge this is a hack and makes the code more complicated, but it's what makes runtime checks possible in a safe way. I'm confident we can come up with a solution to the concrete problem that doesn't involve removing the runtime check foundation. Just dumping some thoughts:
I'm happy to help with addressing this, but I'm not fully understanding what the problem is that we ran into in #518. Can you give some pointers to the concrete problem / code / CI run? |
Well the issue is how the You can reproduce this by manually performing the steps from #518 (create an add-on plugin, run the CLI command). |
@swissspidy Ah, makes sense. In that case, could we add cleanup logic to |
Sparked from #518
object-cache.php
Issue is being investigated in #533
The text was updated successfully, but these errors were encountered: