Provide $_SERVER to App::processConsole()

pull/14716/head
Art4 2025-01-22 13:47:58 +00:00
rodzic 15446f35a5
commit c9bcc45d7c
5 zmienionych plików z 14 dodań i 5 usunięć

Wyświetl plik

@ -19,4 +19,4 @@ $container = \Friendica\Core\DiceContainer::fromBasePath(dirname(__DIR__));
$app = \Friendica\App::fromContainer($container);
$app->processConsole($_SERVER['argv'] ?? []);
$app->processConsole($_SERVER);

Wyświetl plik

@ -24,11 +24,13 @@ chdir(dirname(__DIR__));
require dirname(__DIR__) . '/vendor/autoload.php';
// BC: Add console command as second argument
$argv = $_SERVER['argv'] ?? [];
array_splice($argv, 1, 0, "daemon");
$_SERVER['argv'] = $argv;
$container = \Friendica\Core\DiceContainer::fromBasePath(dirname(__DIR__));
$app = \Friendica\App::fromContainer($container);
$app->processConsole($argv);
$app->processConsole($_SERVER);

Wyświetl plik

@ -19,11 +19,13 @@ chdir(dirname(__DIR__));
require dirname(__DIR__) . '/vendor/autoload.php';
// BC: Add console command as second argument
$argv = $_SERVER['argv'] ?? [];
array_splice($argv, 1, 0, "jetstream");
$_SERVER['argv'] = $argv;
$container = \Friendica\Core\DiceContainer::fromBasePath(dirname(__DIR__));
$app = \Friendica\App::fromContainer($container);
$app->processConsole($argv);
$app->processConsole($_SERVER);

Wyświetl plik

@ -21,11 +21,13 @@ chdir(dirname(__DIR__));
require dirname(__DIR__) . '/vendor/autoload.php';
// BC: Add console command as second argument
$argv = $_SERVER['argv'] ?? [];
array_splice($argv, 1, 0, "worker");
$_SERVER['argv'] = $argv;
$container = \Friendica\Core\DiceContainer::fromBasePath(dirname(__DIR__));
$app = \Friendica\App::fromContainer($container);
$app->processConsole($argv);
$app->processConsole($_SERVER);

Wyświetl plik

@ -181,8 +181,11 @@ class App
);
}
public function processConsole(array $argv): void
public function processConsole(array $serverParams): void
{
$argv = $serverParams['argv'] ?? [];
$this->setupContainerForAddons();
$this->setupLogChannel($this->determineLogChannel($argv));