File version numbers (My Little Forum)
As discussed in the original project forum it is desirable to have a more robust handling of files, that have to be updated in the case of a new version. I want to continue the discussion here.
Summary of the old discussion is:
- the list of files in the update script can be inaccurate because of forgotten files
- the admin, who undertakes the update, can forget to update a file or directory
This is non-satisfying because every when an then a forum operator will report issues with the functions or the template because one of us (maintainer team) who packaged the update forgot to note a file name in the update script or the admin forgot to upload the css file or a subtemplate or a script.
The idea to solve this was to introduce a file version number for every single file. It could be a simple counter that increments in case of changes. The version of the file should be checked against a separate list of the file versions matching with the new version. Micha's idea was to increment the counter once before the release of a new version, mine was to increment it with every commit that affects the file. In both cases the theoretical failing point is to forget the increasing step of a file version number.
The changes of the forum operator shouldn't be overwritten but our changes are often mandatory (i.e. new form fields) so the update must stay incomplete without the update of the template files.
As last for now: The variables should be checked after an update and therefore the variable names must be unique in the meaning of non colliding with other names of the "thousand" variables in the scripts.
So far the summary and a few considerations from my side.