-
Notifications
You must be signed in to change notification settings - Fork 223
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
Rename the WP_Background_Process #2126
Comments
We will try to fix something which must be fixed by other plugins. I mean, if other plugins are doing a correct check about if WP_Background_Process is already included, we won't need to do a trick like that. |
The class we are using is a modified version of the original one. Remy has changed three methods. This means that other plugins will probably have issues if our version is loaded first. Also, in the case I'm checking, partial preloading doesn't work and the Currently, the only solution is to ask the customer to disable the conflicting plugin, which isn't always an option. Renaming the class is relatively easy and will:
Of course, @Tabrisrp has the final saying in this. |
We're kinda at a point where we need to re-assess if this library is the right one for the job, and if some new ones developed since might be better. Especially since WP_Background_Process seems to be no longer maintained at all. Actions Scheduler could be an alternative, especially since it's supported by Automattic now. |
I have confirmed that the issue I mentioned earlier was due to the common class name. I'm documenting here what I did. To troubleshoot this I've installed a WP Rocket version on the website, where I replaced:
I had to |
There is a PHP library, Mozart, which composes all dependencies as a package. This could resolve issues such as this one, where the same library is used by other plugins/themes, by having them under our own namespace. One limitation to consider is that Mozart requires PHP 7.2 or higher in order to run. |
@hellofromtonya If you have some insights to share about this situation, you are welcome :) |
Other plugins, e.g. the GP Premium plugin are using Ashley's Rich
WP_Background_Process
.To avoid conflicts with such plugins, it would be best to rename our own version of the background process.
Gravity forms is already doing this:
GF_Background_Processing
.Possibly related ticket:
https://secure.helpscout.net/conversation/1003908985/131066?folderId=2135277
The text was updated successfully, but these errors were encountered: