src/PHPDish/Bundle/CoreBundle/Command/InstallCommand.php
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $outputStyle = new SymfonyStyle($input, $output);
        $outputStyle->writeln('<info>Installing PHPDish...</info>');
        $outputStyle->writeln(static::PHPDISH_LOGO);

        $this->ensureDirectoryWritableAndExists($this->getContainer()->getParameter('kernel.cache_dir'), $output);
        $this->ensureDirectoryWritableAndExists($this->getContainer()->getParameter('app.dir.media'), $output);
        $this->ensureDirectoryWritableAndExists($this->getContainer()->getParameter('app.dir.uploads'), $output);
        $this->ensureDirectoryWritableAndExists($this->getContainer()->getParameter('app.dir.avatar'), $output);

        $this->getApplication()->setAutoExit(false);

        foreach ($this->commands as $index => $command) {
            $outputStyle->newLine();
            $outputStyle->section(sprintf(
                'Step %d of %d. <info>%s</info>',
                $index + 1,
                count($this->commands),
                $command['message']
            ));
            $this->executeCommand($command['command'], $output, isset($command['options']) ? $command['options'] : []);
        }

        $output->writeln('PHPDish has been successfully installed.');
    }
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $outputStyle = new SymfonyStyle($input, $output);
        $outputStyle->writeln('<info>Installing PHPDish...</info>');
        $outputStyle->writeln(static::PHPDISH_LOGO);

        $this->ensureDirectoryWritableAndExists($this->getContainer()->getParameter('kernel.cache_dir'), $output);
        $this->ensureDirectoryWritableAndExists($this->getContainer()->getParameter('app.dir.media'), $output);
        $this->ensureDirectoryWritableAndExists($this->getContainer()->getParameter('app.dir.uploads'), $output);
        $this->ensureDirectoryWritableAndExists($this->getContainer()->getParameter('app.dir.avatar'), $output);

        $this->getApplication()->setAutoExit(false);

        foreach ($this->commands as $index => $command) {
            $outputStyle->newLine();
            $outputStyle->section(sprintf(
                'Step %d of %d. <info>%s</info>',
                $index + 1,
                count($this->commands),
                $command['message']
            ));
            $this->executeCommand($command['command'], $output, isset($command['options']) ? $command['options'] : []);
        }

        $output->writeln('PHPDish has been successfully installed.');
    }
{@inheritdoc}