Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Version Check/Required Ambiguity

This is something that I will open an issue with but I thought I would discuss it here first, to see what people think.

At the moment the version check for addons is:

version_compare($NewVersion, $Version, '>')

this is ok but it is limited in a way, it always assumes that it is compatible with future versions.

You can actually put additional logic in setup, but it would be good if could be integrated.

I will be doing a lot of development into the future and I want to be flexible, especially as I will be developing quite atomically.

I can think of a number of scenarios:

  1. One version only, exact match, stop gap solution perhaps.
  2. Quite often you see stuff like this >=2.0.18 it would be useful if it could detect those operators an plug into into the function since it has that capability to be exact.
  3. in other cases you need an range you could have for instance >=2.0.17,<=2.0.18

Another scenario that I personally faced was I wanted to require one plugin or another. Actually EXOR. I think it fair that I put my own logic in the setup, which I did. However I think it would be good to give some clue in the Requirements. Perhaps a way to put a requirement that is ignored.

I suppose you could always unset the key, before it gets checked. All scenarios have hacks, but might as well make it sleek.

grep is your friend.

Comments

  • ToddTodd Chief Product Officer Vanilla Staff

    I guess what I'd like to do is move more towards a "tested with" style compatibility where the community can whitelist the versions of Vanilla that match the various plugins.

    Perhaps we can also offer a place to put free-form text that will explain more esoteric version requirements that are checked in code.

  • x00x00 MVP
    edited January 2013

    well exactly I would prefer to have an exact match over an open ended one.

    I would like to say this plugin has has been tested with - list of versions.

    In fact in some cases may wish to split development between versions, as it is not always worth having compatibility code.

    grep is your friend.

Sign In or Register to comment.