tsugiproject / tsugi

Tsugi Admin, Developer, and Management Console (pls join the dev list)
http://www.tsugi.org
Apache License 2.0
346 stars 257 forks source link

Tsugi needs to handle older config.php files that don't include pre_config.php more gracefully #137

Open csev opened 2 years ago

csev commented 2 years ago

In early 2021 as we got rid of Silex, a new line was added to config.php that was required to be included before loading the autoloader.

require_once $dirroot."/vendor/tsugi/lib/include/pre_config.php";

This was announced on the dev list - but if someone does an upgrade and forgets this - they just seen an error later. Add some code to setup.php to notice when the config.php did not properly include pre_config.php.

Details from Tom Brierley:

I narrowed tsugi@85e055f to vendor/tsugi/lib, which bisects to tsugi-php@82dc98a moving _m() from setup.php into setup_i18n.php, which is not included in config.php. This is fixed in a series of commits ending in tsugi@16f5b01 by indirectly including it in pre_config.php

It looks like this line was added to config-dist.php in e9fd767 in January: require_once $dirroot."/vendor/tsugi/lib/include/pre_config.php"; Which was missing from my config.php which I copied from dist last year.

Apologies if I've missed some instructions, I'm still fairly new to Tsugi and have only been running a dev server since last year.

Can I ask, is there a mechanism or an intended process for users to keep their config.php up to date with these types of changes? e.g are there some release/upgrade notes I should be reviewing, or is it possible this was taken care of by admin/upgrade.php and I should be stepping through each git tag?