Improved installation command, reducing duplication and moving serialization logic to specific model

This commit is contained in:
Alejandro Celaya
2017-07-03 20:46:35 +02:00
parent f9c56d7cb1
commit e7f7cbcaac
7 changed files with 546 additions and 386 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env php
<?php
use Shlinkio\Shlink\CLI\Command\Install\UpdateCommand;
use Shlinkio\Shlink\CLI\Command\Install\InstallCommand;
use Symfony\Component\Console\Application;
use Zend\Config\Writer\PhpArray;
@@ -9,7 +9,7 @@ chdir(dirname(__DIR__));
require __DIR__ . '/../vendor/autoload.php';
$app = new Application();
$command = new UpdateCommand(new PhpArray());
$command = new InstallCommand(new PhpArray(), true);
$app->add($command);
$app->setDefaultCommand($command->getName());
$app->run();