aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Command
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Command')
-rw-r--r--src/Wallabag/CoreBundle/Command/InstallCommand.php37
1 files changed, 16 insertions, 21 deletions
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index 035eb865..3873d2d3 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -61,7 +61,6 @@ class InstallCommand extends ContainerAwareCommand
61 ->setupDatabase() 61 ->setupDatabase()
62 ->setupAdmin() 62 ->setupAdmin()
63 ->setupConfig() 63 ->setupConfig()
64 ->setupAsset()
65 ; 64 ;
66 65
67 $output->writeln('<info>Wallabag has been successfully installed.</info>'); 66 $output->writeln('<info>Wallabag has been successfully installed.</info>');
@@ -70,7 +69,7 @@ class InstallCommand extends ContainerAwareCommand
70 69
71 protected function checkRequirements() 70 protected function checkRequirements()
72 { 71 {
73 $this->defaultOutput->writeln('<info><comment>Step 1 of 5.</comment> Checking system requirements.</info>'); 72 $this->defaultOutput->writeln('<info><comment>Step 1 of 4.</comment> Checking system requirements.</info>');
74 73
75 $rows = []; 74 $rows = [];
76 75
@@ -138,7 +137,7 @@ class InstallCommand extends ContainerAwareCommand
138 137
139 protected function setupDatabase() 138 protected function setupDatabase()
140 { 139 {
141 $this->defaultOutput->writeln('<info><comment>Step 2 of 5.</comment> Setting up database.</info>'); 140 $this->defaultOutput->writeln('<info><comment>Step 2 of 4.</comment> Setting up database.</info>');
142 141
143 // user want to reset everything? Don't care about what is already here 142 // user want to reset everything? Don't care about what is already here
144 if (true === $this->defaultInput->getOption('reset')) { 143 if (true === $this->defaultInput->getOption('reset')) {
@@ -209,7 +208,7 @@ class InstallCommand extends ContainerAwareCommand
209 208
210 protected function setupAdmin() 209 protected function setupAdmin()
211 { 210 {
212 $this->defaultOutput->writeln('<info><comment>Step 3 of 5.</comment> Administration setup.</info>'); 211 $this->defaultOutput->writeln('<info><comment>Step 3 of 4.</comment> Administration setup.</info>');
213 212
214 $questionHelper = $this->getHelperSet()->get('question'); 213 $questionHelper = $this->getHelperSet()->get('question');
215 $question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (Y/n)', true); 214 $question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (Y/n)', true);
@@ -253,7 +252,7 @@ class InstallCommand extends ContainerAwareCommand
253 252
254 protected function setupConfig() 253 protected function setupConfig()
255 { 254 {
256 $this->defaultOutput->writeln('<info><comment>Step 4 of 5.</comment> Config setup.</info>'); 255 $this->defaultOutput->writeln('<info><comment>Step 4 of 4.</comment> Config setup.</info>');
257 $em = $this->getContainer()->get('doctrine.orm.entity_manager'); 256 $em = $this->getContainer()->get('doctrine.orm.entity_manager');
258 257
259 // cleanup before insert new stuff 258 // cleanup before insert new stuff
@@ -261,6 +260,11 @@ class InstallCommand extends ContainerAwareCommand
261 260
262 $settings = [ 261 $settings = [
263 [ 262 [
263 'name' => 'share_public',
264 'value' => '1',
265 'section' => 'entry',
266 ],
267 [
264 'name' => 'carrot', 268 'name' => 'carrot',
265 'value' => '1', 269 'value' => '1',
266 'section' => 'entry', 270 'section' => 'entry',
@@ -331,8 +335,13 @@ class InstallCommand extends ContainerAwareCommand
331 'section' => 'export', 335 'section' => 'export',
332 ], 336 ],
333 [ 337 [
334 'name' => 'pocket_consumer_key', 338 'name' => 'import_with_redis',
335 'value' => null, 339 'value' => '0',
340 'section' => 'import',
341 ],
342 [
343 'name' => 'import_with_rabbitmq',
344 'value' => '0',
336 'section' => 'import', 345 'section' => 'import',
337 ], 346 ],
338 [ 347 [
@@ -392,20 +401,6 @@ class InstallCommand extends ContainerAwareCommand
392 return $this; 401 return $this;
393 } 402 }
394 403
395 protected function setupAsset()
396 {
397 $this->defaultOutput->writeln('<info><comment>Step 5 of 5.</comment> Installing assets.</info>');
398
399 $this
400 ->runCommand('assets:install')
401 ->runCommand('assetic:dump')
402 ;
403
404 $this->defaultOutput->writeln('');
405
406 return $this;
407 }
408
409 /** 404 /**
410 * Run a command. 405 * Run a command.
411 * 406 *