refactor: introduce DI container (#4238)

* refactor: introduce DI container

* add bin/test
This commit is contained in:
Dag 2024-08-29 22:48:59 +02:00 committed by GitHub
parent e010fd4d52
commit 58544cd61a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 231 additions and 89 deletions

View file

@ -17,11 +17,8 @@ if (file_exists(__DIR__ . '/../config.ini.php')) {
}
Configuration::loadConfiguration($config, getenv());
$logger = new SimpleLogger('rssbridge');
$container = require __DIR__ . '/../lib/dependencies.php';
$logger->addHandler(new StreamHandler('php://stderr', Logger::INFO));
$cacheFactory = new CacheFactory($logger);
$cache = $cacheFactory->create();
$cache = $container['cache'];
$cache->clear();