]> git.mxchange.org Git - friendica.git/blobdiff - bin/console.php
Fix optical glitch: Replace multiple newlines when replacing attachments
[friendica.git] / bin / console.php
index 9264e3eee46080d294ff79fd28041340ed239942..a6513a2e8f992bdd52d5a8bfea7ff81e5c7e94ef 100755 (executable)
@@ -1,13 +1,12 @@
 #!/usr/bin/env php
 <?php
 
-require dirname(__DIR__) . '/vendor/autoload.php';
-
-use Friendica\Util\LoggerFactory;
+use Dice\Dice;
+use Psr\Log\LoggerInterface;
 
-$logger = LoggerFactory::create('console');
+require dirname(__DIR__) . '/vendor/autoload.php';
 
-$a = new Friendica\App(dirname(__DIR__), $logger);
-\Friendica\BaseObject::setApp($a);
+$dice = (new Dice())->addRules(include __DIR__ . '/../static/dependencies.config.php');
+$dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['console']]);
 
-(new Friendica\Core\Console($argv))->execute();
+(new Friendica\Core\Console($dice, $argv))->execute();