2016-04-10 10:52:44 +03:00
|
|
|
<?php
|
2019-10-05 18:26:10 +03:00
|
|
|
|
2017-10-12 11:13:20 +03:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2019-12-23 12:38:06 +03:00
|
|
|
use Symfony\Component\Lock;
|
2016-04-10 10:52:44 +03:00
|
|
|
use Zend\ServiceManager\ServiceManager;
|
|
|
|
|
2016-04-10 13:06:28 +03:00
|
|
|
chdir(dirname(__DIR__));
|
|
|
|
|
2016-04-17 21:27:24 +03:00
|
|
|
require 'vendor/autoload.php';
|
2016-04-10 10:52:44 +03:00
|
|
|
|
2019-12-23 13:00:38 +03:00
|
|
|
// This class alias tricks the ConfigAbstractFactory to return Lock\Factory instances even with a different service name
|
2019-12-23 13:13:32 +03:00
|
|
|
class_alias(Lock\LockFactory::class, 'Shlinkio\Shlink\LocalLockFactory');
|
2019-12-23 13:00:38 +03:00
|
|
|
|
2016-04-10 10:52:44 +03:00
|
|
|
// Build container
|
|
|
|
$config = require __DIR__ . '/config.php';
|
2016-07-31 17:30:05 +03:00
|
|
|
$container = new ServiceManager($config['dependencies']);
|
2016-04-10 10:52:44 +03:00
|
|
|
$container->setService('config', $config);
|
2016-04-17 21:27:24 +03:00
|
|
|
return $container;
|