forked from librenms/librenms
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Refactor database and config init (librenms#8527)
* Refactor database and config init Connect to the database without loading full config Load config completely so post-processing is always done consistently. Erase existing $config when loading, fixes issues in case we load the config twice. If the database is not connected, don't try to load database settings. (Fixes some db errors on install) Attempt to remove $config access/modification before init.php Remove usage of db_name, that might not match the connected database. Centralize db config loading, so we consistently apply db_test database settings. Many of these changes are influenced by Laravel port. * Some safety so we don't assign strings to numeric port field Smooth out phpunit bootstrap * Fix a couple of scrutinizer warnings.
- Loading branch information
1 parent
9850152
commit 28c01b9
Showing
15 changed files
with
189 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.