2016-08-15 02:21:14 -05:00
|
|
|
#!/usr/bin/env php
|
|
|
|
<?php
|
2017-07-05 11:12:03 -05:00
|
|
|
use Shlinkio\Shlink\CLI\Factory\InstallApplicationFactory;
|
2017-07-22 06:41:41 -05:00
|
|
|
use Shlinkio\Shlink\CLI\Install\Plugin\DatabaseConfigCustomizerPlugin;
|
2016-08-15 02:21:14 -05:00
|
|
|
use Symfony\Component\Console\Application;
|
2017-07-05 13:04:44 -05:00
|
|
|
use Symfony\Component\Console\Helper\QuestionHelper;
|
|
|
|
use Symfony\Component\Filesystem\Filesystem;
|
2017-07-22 06:41:41 -05:00
|
|
|
use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
|
2017-07-05 13:04:44 -05:00
|
|
|
use Zend\ServiceManager\Factory\InvokableFactory;
|
2017-07-05 11:12:03 -05:00
|
|
|
use Zend\ServiceManager\ServiceManager;
|
2016-08-15 02:21:14 -05:00
|
|
|
|
|
|
|
chdir(dirname(__DIR__));
|
|
|
|
|
|
|
|
require __DIR__ . '/../vendor/autoload.php';
|
|
|
|
|
2017-07-22 06:41:41 -05:00
|
|
|
$container = new ServiceManager([
|
|
|
|
'factories' => [
|
|
|
|
Application::class => InstallApplicationFactory::class,
|
|
|
|
Filesystem::class => InvokableFactory::class,
|
|
|
|
QuestionHelper::class => InvokableFactory::class,
|
|
|
|
],
|
|
|
|
'services' => [
|
|
|
|
'config' => [
|
|
|
|
ConfigAbstractFactory::class => [
|
|
|
|
DatabaseConfigCustomizerPlugin::class => [QuestionHelper::class, Filesystem::class]
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
]);
|
2017-07-05 11:12:03 -05:00
|
|
|
$container->build(Application::class, ['isUpdate' => true])->run();
|