XF 2.0 Check minimum version in setup

Snog

Well-known member
I know how to check the installed version of an add-on during install. But I can't find a way to throw an error if it's not a minimum version.

I need to check the legacy add-on version (which I can do) and return an error from the first upgrade step if it's below a given number.
 
You can create a checkRequirements(&$errors = [], &$warnings = []) method in your setup class (see \XF\AddOn\AddOn::checkRequirements).

Liam
 
Last edited:
Top Bottom