Improved and simplified all installation process thanks to symfony style

This commit is contained in:
Alejandro Celaya
2017-12-28 15:52:10 +01:00
parent 5de845c258
commit 4dffc9f0c1
11 changed files with 102 additions and 221 deletions

View File

@@ -8,7 +8,6 @@ use Interop\Container\Exception\ContainerException;
use Shlinkio\Shlink\CLI\Command\Install\InstallCommand;
use Shlinkio\Shlink\CLI\Install\ConfigCustomizerPluginManager;
use Shlinkio\Shlink\CLI\Install\Plugin;
use Shlinkio\Shlink\CLI\Install\Plugin\Factory\DefaultConfigCustomizerPluginFactory;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Exception\LogicException;
use Symfony\Component\Filesystem\Filesystem;
@@ -17,6 +16,7 @@ use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
use Zend\ServiceManager\Exception\ServiceNotCreatedException;
use Zend\ServiceManager\Exception\ServiceNotFoundException;
use Zend\ServiceManager\Factory\FactoryInterface;
use Zend\ServiceManager\Factory\InvokableFactory;
class InstallApplicationFactory implements FactoryInterface
{
@@ -43,9 +43,9 @@ class InstallApplicationFactory implements FactoryInterface
$container->get(Filesystem::class),
new ConfigCustomizerPluginManager($container, ['factories' => [
Plugin\DatabaseConfigCustomizerPlugin::class => ConfigAbstractFactory::class,
Plugin\UrlShortenerConfigCustomizerPlugin::class => DefaultConfigCustomizerPluginFactory::class,
Plugin\LanguageConfigCustomizerPlugin::class => DefaultConfigCustomizerPluginFactory::class,
Plugin\ApplicationConfigCustomizerPlugin::class => DefaultConfigCustomizerPluginFactory::class,
Plugin\UrlShortenerConfigCustomizerPlugin::class => InvokableFactory::class,
Plugin\LanguageConfigCustomizerPlugin::class => InvokableFactory::class,
Plugin\ApplicationConfigCustomizerPlugin::class => InvokableFactory::class,
]]),
$isUpdate
);