stable

Clone or download

Read-only

chore(forge-config): Clean-up ForgeConfig loading

The main loading logic of the configuration was in pre.php without proper test so the first thing was to transfer that logic inside ForgeConfig so it can be controled and tested. This change comes with removal, as much as possible, to specific config loading (in some places we were loading only local.inc for instance) in most of those places it was not needed to make a special case and, in fine, might have provided incorrect values. On ForgeConfig, `loadFromFile` was left public because it still used in some tests (integration & e2e distlp) and it would have required too much work to remove usage at this stage while there is a longer plan to address the issue. Part-of: story #22708 flexibility in the management of Tuleap Configuration Change-Id: Id16e888c9ee2ce8f7ee32becb724026bdf81306c

Modified Files

Name
M plugins/mediawiki/www/setpath.php +1 −2 Go to diff View file
M src/common/Config/ForgeConfig.php +34 −28 Go to diff View file
M src/common/Config/LocalIncFinder.php +1 −1 Go to diff View file
M src/forgeupgrade/forgeupgrade.php +1 −2 Go to diff View file
M src/tuleap-cfg/Command/Docker/LogToSyslog.php +1 −2 Go to diff View file
M src/tuleap-cfg/Command/Docker/Tuleap.php +1 −2 Go to diff View file
M src/tuleap-cfg/Command/SetupForgeUpgradeCommand.php +1 −2 Go to diff View file
M src/tuleap-cfg/Command/SiteDeploy/FPM/SiteDeployFPMCommand.php +1 −1 Go to diff View file
M src/tuleap-cfg/Command/SiteDeploy/ForgeUpgrade/SiteDeployForgeUpgradeCommand.php +1 −2 Go to diff View file
M src/tuleap-cfg/Command/SiteDeploy/Images/SiteDeployImagesCommand.php +1 −1 Go to diff View file
M src/tuleap-cfg/Command/SiteDeploy/Nginx/SiteDeployNginxCommand.php +1 −1 Go to diff View file
M src/www/include/pre.php +1 −5 Go to diff View file
M tests/unit/common/Config/ForgeConfigTest.php +39 −14 Go to diff View file
A tests/unit/common/Config/_fixtures/sequence/database.inc +3 −0 Go to diff View file
A tests/unit/common/Config/_fixtures/sequence/local.inc +5 −0 Go to diff View file
M tests/unit/common/language/BaseLanguageFactoryTest.php +14 −2 Go to diff View file
D tests/unit/common/language/_fixtures/local.inc +0 −30 Go to diff View file