Dynamic config loading
- Move settings, defaults and dbstructure to directory 'static' - Dynamic loading of config files (after the static loading) - Filter out '-sample.config.php' and '-sample.ini.php' files - Remove unnecessary ConfigFileManager - Move ConfigFileLoader to Utils - Add tests for multi-loading for INI, config and sample-filtering
This commit is contained in:
parent
966043712f
commit
92fb0a82ca
25 changed files with 325 additions and 161 deletions
29
tests/datasets/config/B.config.php
Normal file
29
tests/datasets/config/B.config.php
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* A test file for local configuration
|
||||
*
|
||||
*/
|
||||
|
||||
return [
|
||||
'database' => [
|
||||
'hostname' => 'testhost',
|
||||
'username' => 'testuser',
|
||||
'password' => 'testpw',
|
||||
'database' => 'testdb',
|
||||
'charset' => 'utf8mb4',
|
||||
],
|
||||
|
||||
'config' => [
|
||||
'admin_email' => 'admin@overwritten.local',
|
||||
'sitename' => 'Friendica Social Network',
|
||||
'register_policy' => \Friendica\Module\Register::OPEN,
|
||||
'register_text' => '',
|
||||
],
|
||||
'system' => [
|
||||
'default_timezone' => 'UTC',
|
||||
'language' => 'en',
|
||||
'theme' => 'frio',
|
||||
'newKey' => 'newValue',
|
||||
],
|
||||
];
|
20
tests/datasets/config/B.ini.php
Normal file
20
tests/datasets/config/B.ini.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
/**
|
||||
* A test local ini file
|
||||
*/
|
||||
|
||||
return <<<INI
|
||||
|
||||
[database]
|
||||
hostname = testhost
|
||||
username = testuser
|
||||
password = testpw
|
||||
database = testdb
|
||||
|
||||
[system]
|
||||
theme = changed
|
||||
newKey = newValue
|
||||
|
||||
[config]
|
||||
admin_email = admin@overwritten.local
|
||||
INI;
|
Loading…
Add table
Add a link
Reference in a new issue