-
Notifications
You must be signed in to change notification settings - Fork 40
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
Cannot redeclare Patchwork\redefine() #49
Comments
Indeed, you might want to surround your own (Older versions used to have However, I'll address this in Patchwork's code too, as this is a very general issue. Also, I'm awfully sorry, but I couldn't quite understand the concern in your last paragraph, so there might still have been some miscommunication. And thank you for the kind words :) |
Thanks for your time on the response. My question is about renaming the namespace to something else. like Patchwork2. If I have to do this, how should I start? |
Checking for function does not help.
I still get the same error.
|
(My apologies again, I'd been working on a take-home assignment for a job interview for the past few days.) I see that this might not work if the other copy of Patchwork is autoloaded at an unpredictable point in time. For now, I guess the only thing I can suggest is manually editing out the conflicting As for your first response: running two copies of Patchwork simultaneously (if you really mean that) would be really difficult to accomplish. The preprocessing component (CodeManipulation) is the main obstacle here. |
Please upgrade to 2.0.1 :) |
I guess the below question looks like a newbie PHP question. But I wanted to hear the solution from the developer of this great package.
I am developing a plugin for a CMS which uses Patchwork library. The CMS has another plugin using Patchwork.
Due to 2 declaration of same classes/functions, I am getting the fatal error as below.
Fatal error: Cannot redeclare Patchwork\redefine()
If I have to re-declare all classes/function to a new namespace, what will be the best approach? Using function_exist method will help?
The text was updated successfully, but these errors were encountered: