]> git.mxchange.org Git - friendica.git/blobdiff - bin/console.php
spelling: username
[friendica.git] / bin / console.php
index 4d5b4c79c2894f679239bf039dda6655c711036c..e1bc6b498547f4e15e368ad429c489333a474bd9 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env php
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -26,6 +26,7 @@ if (php_sapi_name() !== 'cli') {
 }
 
 use Dice\Dice;
+use Friendica\DI;
 use Psr\Log\LoggerInterface;
 
 require dirname(__DIR__) . '/vendor/autoload.php';
@@ -33,4 +34,8 @@ require dirname(__DIR__) . '/vendor/autoload.php';
 $dice = (new Dice())->addRules(include __DIR__ . '/../static/dependencies.config.php');
 $dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['console']]);
 
+/// @fixme Necessary until Hooks inside the Logger can get loaded without the DI-class
+DI::init($dice);
+\Friendica\Core\Logger\Handler\ErrorHandler::register($dice->create(\Psr\Log\LoggerInterface::class));
+
 (new Friendica\Core\Console($dice, $argv))->execute();