Move creation of Dice into Container class

This commit is contained in:
Art4 2025-01-08 22:35:27 +00:00
parent 610267a3ea
commit 37ffeb8121
7 changed files with 19 additions and 33 deletions

View file

@ -5,8 +5,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
use Dice\Dice;
$start_time = microtime(true);
if (!file_exists(__DIR__ . '/vendor/autoload.php')) {
@ -17,9 +15,7 @@ require __DIR__ . '/vendor/autoload.php';
$request = \GuzzleHttp\Psr7\ServerRequest::fromGlobals();
$dice = (new Dice())->addRules(require(__DIR__ . '/static/dependencies.config.php'));
$container = \Friendica\Core\Container::fromDice($dice);
$container = \Friendica\Core\Container::fromBasePath(__DIR__);
$app = \Friendica\App::fromContainer($container);
$app->processRequest($request, $start_time);