Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Does the addon.json "require" key work?

edited January 2018 in Vanilla 2.0 - 2.8

I created addon.json to replace the about.php file in one of my apps.

It has the "require" key like so:

"require": {
  "vanilla": ">=2.5"
}

To test the version requirement, I set the value to >=2.6, but it still let me enable the app in Vanilla 2.5. We don't need to use this now, but it'd make a good bug report. Has this worked for anyone else?

On a related note, I haven't tested this yet, but does Vanilla 2.5 read only addon.json if both files exist? Additionally, if an admin hypothetically had installed app that works for 2.3 and upgraded the app to one that requires 2.5 while still being on 2.3, the old about.php won't prevent them from using the app, so it's up to the developer to make clear upgrade instructions and the admin to make sure they follow them accordingly since the addon.json file is pretty nice!

Add Pages to Vanilla with the Basic Pages app

Comments

  • The version number check isn't correct - there already is an open issue :wink:
    The plugin key check seems to work.

    I don't know if addon.json and PluginInfo is combined, but addon.json overrules PluginInfo. The version requirement (if it would work) would be always taken from the addon.json if that file exists

  • Thanks, R_J! Looks like there's some movement on that issue now. :)

    I can also confirm that if both addon.json and about.php exist, addon.json takes precedence in the dashboard.

    Add Pages to Vanilla with the Basic Pages app

Sign In or Register to comment.