Not planned New code event listener for post_upgrade

Jon W

Well-known member
It would be incredibly useful to have a code event listener (post_upgrade) that is called just after the updateVersion method in XenForo_Install_Model_Upgrade is called (or somewhere around there).
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
Listeners--intentionally--don't run in the upgrade system at all. Otherwise, it'd create plenty of "impossible to upgrade" situations.

You could work around this by storing the last known version in a simple cache and checking if the version ID has changed in the options.

But can you explain what you're trying to do with this?
 
I want to change what code event listeners are available to an add-on after upgrade.

For example, in 1.1.5, I would only want one load_class_controller listener, but in version 1.2, I would want several but with hints.

Running this at any point after the upgrade has finished has its own problems.
 
I'm also interested in creating template edits. Basically anything that wasn't available in the previous version.

In future (i.e., 1.3 etc.), there may be other such things that I would like to add as soon as they become available.
 
I'd rather keep the install/upgrade process entirely free of listeners to ensure the best chance of the upgrade completely successfully. I'm not keen on a conditional "load them when..." trigger there.
 
Top Bottom