mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-07 15:54:26 +02:00
Introduce dynamic hook loading
- Dynamically load addon files - Dynamically load hooks - Rewrite Logger-logic to use new hook logic (Monolog is working again)
This commit is contained in:
parent
ff092833ae
commit
14b76e48f0
39 changed files with 1163 additions and 469 deletions
|
@ -29,6 +29,7 @@ if (php_sapi_name() !== 'cli') {
|
|||
use Dice\Dice;
|
||||
use Friendica\App;
|
||||
use Friendica\App\Mode;
|
||||
use Friendica\Core\Logger\Capabilities\LogChannel;
|
||||
use Friendica\Core\Update;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\DI;
|
||||
|
@ -54,7 +55,10 @@ if (!file_exists("index.php") && (sizeof($_SERVER["argv"]) != 0)) {
|
|||
require dirname(__DIR__) . '/vendor/autoload.php';
|
||||
|
||||
$dice = (new Dice())->addRules(include __DIR__ . '/../static/dependencies.config.php');
|
||||
$dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['worker']]);
|
||||
/** @var \Friendica\Core\Addon\Capabilities\ICanLoadAddons $addonLoader */
|
||||
$addonLoader = $dice->create(\Friendica\Core\Addon\Capabilities\ICanLoadAddons::class);
|
||||
$dice = $dice->addRules($addonLoader->getActiveAddonConfig('dependencies'));
|
||||
$dice = $dice->addRule(LoggerInterface::class,['constructParams' => [LogChannel::WORKER]]);
|
||||
|
||||
DI::init($dice);
|
||||
\Friendica\Core\Logger\Handler\ErrorHandler::register($dice->create(\Psr\Log\LoggerInterface::class));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue