Create PSR-7 request

This commit is contained in:
Art4 2024-12-19 20:07:37 +00:00
parent d6ec1d7d6b
commit 16bdd76be1

View file

@ -15,11 +15,13 @@ if (!file_exists(__DIR__ . '/vendor/autoload.php')) {
require __DIR__ . '/vendor/autoload.php';
$request = \GuzzleHttp\Psr7\ServerRequest::fromGlobals();
$dice = (new Dice())->addRules(include __DIR__ . '/static/dependencies.config.php');
/** @var \Friendica\Core\Addon\Capability\ICanLoadAddons $addonLoader */
$addonLoader = $dice->create(\Friendica\Core\Addon\Capability\ICanLoadAddons::class);
$dice = $dice->addRules($addonLoader->getActiveAddonConfig('dependencies'));
$dice = $dice->addRule(Friendica\App\Mode::class, ['call' => [['determineRunMode', [false, $_SERVER], Dice::CHAIN_CALL]]]);
$dice = $dice->addRule(Friendica\App\Mode::class, ['call' => [['determineRunMode', [false, $request->getServerParams()], Dice::CHAIN_CALL]]]);
\Friendica\DI::init($dice);
@ -36,7 +38,7 @@ $a->runFrontend(
$dice->create(\Friendica\App\Page::class),
$dice->create(\Friendica\Content\Nav::class),
$dice->create(Friendica\Module\Special\HTTPException::class),
new \Friendica\Util\HTTPInputData($_SERVER),
new \Friendica\Util\HTTPInputData($request->getServerParams()),
$start_time,
$_SERVER
$request->getServerParams()
);