I have this already in Matomo for WordPress and I found this update history super valuable in order to know between which versions a feature potentially regressed. Especially for the big Matomo 4 update where there might be various regressions and issues I'm thinking it will be super valuable to know from what version someone upgraded.
Put it for now in the
Updater::updateComponents method because this is executed for UI Updates and CLI updates and especially because it will make sure that we get this information already for people updating from Matomo 3.X or 2.X to the latest Matomo 4 version. We could have put it into some other places and even done it in a task and simply recorded
Version::VERSION etc but then we might not have gotten the information from which version they updated to Matomo 4.
There's currently always a trailing end since I don't check if the value is empty in $history but that shouldn't be too important.