namespace Wallabag\CoreBundle\Command;
-use Craue\ConfigBundle\Entity\Setting;
use FOS\UserBundle\Event\UserEvent;
use FOS\UserBundle\FOSUserEvents;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\Question;
use Symfony\Component\Console\Style\SymfonyStyle;
+use Wallabag\CoreBundle\Entity\InternalSetting;
class InstallCommand extends ContainerAwareCommand
{
$this->io = new SymfonyStyle($input, $output);
- $this->io->title('Wallabag installer');
+ $this->io->title('wallabag installer');
$this
->checkRequirements()
->setupConfig()
;
- $this->io->success('Wallabag has been successfully installed.');
+ $this->io->success('wallabag has been successfully installed.');
$this->io->success('You can now configure your web server, see https://doc.wallabag.org');
}
$question->setHidden(true);
$user->setPlainPassword($this->io->askQuestion($question));
- $user->setEmail($this->io->ask('Email', ''));
+ $user->setEmail($this->io->ask('Email', 'wallabag@wallabag.io'));
$user->setEnabled(true);
$user->addRole('ROLE_SUPER_ADMIN');
$em = $this->getContainer()->get('doctrine.orm.entity_manager');
// cleanup before insert new stuff
- $em->createQuery('DELETE FROM CraueConfigBundle:Setting')->execute();
+ $em->createQuery('DELETE FROM WallabagCoreBundle:InternalSetting')->execute();
foreach ($this->getContainer()->getParameter('wallabag_core.default_internal_settings') as $setting) {
- $newSetting = new Setting();
+ $newSetting = new InternalSetting();
$newSetting->setName($setting['name']);
$newSetting->setValue($setting['value']);
$newSetting->setSection($setting['section']);
if (0 !== $exitCode) {
$this->getApplication()->setAutoExit(true);
- throw new \RuntimeException(
- 'The command "' . $command . "\" generates some errors: \n\n"
- . $output->fetch());
+ throw new \RuntimeException('The command "' . $command . "\" generates some errors: \n\n" . $output->fetch());
}
return $this;