Skip to content
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

Conflicts between plugins #37

Closed
4nickpick opened this issue Sep 24, 2015 · 8 comments
Closed

Conflicts between plugins #37

4nickpick opened this issue Sep 24, 2015 · 8 comments
Labels
Milestone

Comments

@4nickpick
Copy link

I've installed two plugins: wp-notification-center and github-updater.

These plugins both utilize wp-update-php, albeit different versions of the plugin.

My host has PHP 5.5, but now I can't use these plugins together because of conflicts: method set_plugin_name is undefined in github-updater.

Wouldn't it be more responsible to make this a standalone plugin that other plugins could share?

@afragen
Copy link
Contributor

afragen commented Sep 24, 2015

FWIW, GitHub Updater uses release-1-1-0 branch.

@4nickpick
Copy link
Author

Seems strange to not have updated the master branch in months and confuse potential users like wp-notification-center.

@afragen
Copy link
Contributor

afragen commented Sep 24, 2015

Conflict fixed in GitHub Updater. afragen/git-updater@87eda7e

Well, not so much. I'm going to revert it.

@afragen
Copy link
Contributor

afragen commented Sep 24, 2015

@coenjacobs any idea when release-1.1.0 and master will get merged?

@coenjacobs
Copy link
Member

I'm gonna cc the developer of the wp-notification-center plugin in here, @barrykooij, even though he's not the one to blame. @afragen my friend, you are. 😉

Version 1.1.0 of this library is not been released yet and therefore it shouldn't be used in a stable plugin. This shouldn't be an issue obviously, as 1.1.0 is perfectly backwards compatible with 1.0.0 implementations, BUT WordPress is throwing us a curveball on that assumption. I've explained this problem on my blog before and it's actually funny that this shows up right now, since I'm doing a WordCamp presentation on this very subject this weekend.

All joking aside, this is definitely something I'm gonna look into in the coming days. Even though this is fairly easy to fix (as @afragen showed), it's something that the core library should support as not everyone is aware of this issue. If anyone has any bright ideas, I'd love to hear them.

To answer your question regarding the merge, #22 is still on the list to fix before we can release 1.1.0 in the wild. Maybe I'm going to resolve #35 first as well, since that requires quite the rewrite already. At that point, doing a full rewrite that takes care of issues like this one, might be worth it. Maybe make that update version 2.0.0 right away?

@coenjacobs coenjacobs added this to the 1.1.0 milestone Sep 24, 2015
@coenjacobs coenjacobs added the bug label Sep 24, 2015
@afragen
Copy link
Contributor

afragen commented Sep 24, 2015

You are correct @coenjacobs, it is my fault for not using the master branch. There are several improvements, among them the ability to add the admin notice under multisite and the ability to add the plugin name that are very helpful.

Unfortunately the fix demonstrated some additional problems, but I'll see about mitigating them.

There is nothing inherently wrong with release-1-1-0. Release early and often my friend.

I'm doing a WordCamp talk this weekend too. Have a great day event. 👍

@afragen
Copy link
Contributor

afragen commented Sep 24, 2015

OK, I think I did a better job of it. afragen/git-updater@397d3d7

@coenjacobs
Copy link
Member

I'm going to close this issue now, it has done it's job. Developers should either prefix the class names (use Mozart to automate this), or use some other safeguard like @afragen shows to prevent these kind of errors. I like to think that Mozart prevents pretty much all these sorts of collisions.

The new 2.0.0 release (test drive on this branch) has split up the main class into a couple separate classes, which makes it almost impossible to catch all differences between versions, so I highly recommend using Mozart (or doing it manually, but nobody likes doing that) for implementing this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants