mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Convert Config to a singleton (#16349)
* Convert Config to a singleton Continuation of #14364 by @Jellyfrog This time, make the old class a shim for the facade. Will update references in a separate PR. * Remove logging config call * Apply fixes from StyleCI * Fix bad Git constructor call * Fail on config table does not exist instead of throw exception * Inline LibrenmsConfig::isRegistered() * Debug call in case there are more issues, remove before merge. * Fix up config tests * Allow config cache controlled by CONFIG_CACHE_TTL (disabled by default for now) * Enable config cache for tests * Remove debug statement and deprecation phpdoc * Apply fixes from StyleCI --------- Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
||||
use LibreNMS\Config;
|
||||
use LibreNMS\Util\Snmpsim;
|
||||
|
||||
$install_dir = realpath(__DIR__ . '/..');
|
||||
@@ -84,7 +83,6 @@ if (getenv('DBTEST')) {
|
||||
unset($db_config);
|
||||
}
|
||||
|
||||
Config::reload(); // reload the config including database config
|
||||
\LibreNMS\Util\OS::updateCache(true); // Force update of OS Cache
|
||||
|
||||
app()->terminate(); // destroy the bootstrap Laravel application
|
||||
|
Reference in New Issue
Block a user