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

@ -9,8 +9,6 @@
* @deprecated 2025.02 use bin/console.php jetstream instead
*/
use Dice\Dice;
if (php_sapi_name() !== 'cli') {
header($_SERVER["SERVER_PROTOCOL"] . ' 403 Forbidden');
exit();
@ -21,12 +19,10 @@ chdir(dirname(__DIR__));
require dirname(__DIR__) . '/vendor/autoload.php';
$dice = (new Dice())->addRules(require(dirname(__DIR__) . '/static/dependencies.config.php'));
$argv = $_SERVER['argv'] ?? [];
array_splice($argv, 1, 0, "jetstream");
$container = \Friendica\Core\Container::fromDice($dice);
$container = \Friendica\Core\Container::fromBasePath(dirname(__DIR__));
$app = \Friendica\App::fromContainer($container);