[wp-hackers] Facebook API and WordPress Plugin Development - Insight / Best Practice

Ryan McCue lists at rotorised.com
Thu Nov 15 14:17:52 UTC 2012


Mike Schinkel wrote:
> That position allows for no improvements to a library's functionality, and that's just not realistic.  Libraries should be able to make backward compatible changes that in many cases are not forward compatible.

That's why the latest version would be loaded, so only backwards
compatibility would matter.

> For example if two plugins need the same library but Plugin A uses Library v1.0 whereas Plugin B needs Library v1.1 then if Plugin A loads Library v1.0 first Plugin B is screwed because it cannot load Library v1.1 but if WordPress would allow both plugins to register the library they each need WordPress could choose to load v1.1 instead of v1.0. And the code to make all this work is pretty trivial.

If it can't load 1.1 and use it the same as 1.0, that's a backwards
compatibility breakage.

> Doesn't what I just presented above not a good way to handle it?  If not, why not?

What specific implementation is that? When I say "no good way to handle
it", I mean multiple versions of the same plugin.

>> The best we can do is say "a requires b version >= 0.2", and the plugins have to handle
> 
>> API backwards compatibility.
> 
> I don't follow "a requires b version >= 0.2"

As in, you can require a minimum version, but you can't require a single
version or a maximum version. That way, we can solve dependency versions
quite easily.

In any case, this is all fairly off-topic of the original thread.

-- 
Ryan McCue
<http://ryanmccue.info/>


More information about the wp-hackers mailing list