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