mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-07 15:54:26 +02:00
Move creation of Dice into Container class
This commit is contained in:
parent
610267a3ea
commit
37ffeb8121
7 changed files with 19 additions and 33 deletions
|
@ -16,19 +16,15 @@ if (php_sapi_name() !== 'cli') {
|
|||
exit();
|
||||
}
|
||||
|
||||
use Dice\Dice;
|
||||
|
||||
// Ensure that worker.php is executed from the base path of the installation
|
||||
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, "worker");
|
||||
|
||||
$container = \Friendica\Core\Container::fromDice($dice);
|
||||
$container = \Friendica\Core\Container::fromBasePath(dirname(__DIR__));
|
||||
|
||||
$app = \Friendica\App::fromContainer($container);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue