Skip to content

Instantly share code, notes, and snippets.

Created January 21, 2021 06:15
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
namespace Customize\Command;
use Eccube\Command\PluginCommandTrait;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Process\Process;
class InstallerCommand extends Command
protected static $defaultName = 'customize:install';
use PluginCommandTrait;
protected function configure()
->setDescription('Load customize data fixtures to database.');
protected function execute(InputInterface $input, OutputInterface $output)
$io = new SymfonyStyle($input, $output);
$process = new Process('bin/console eccube:install -n');
$finder = Finder::create()
->in(__DIR__ . '/Fixtures')
foreach ($finder->getIterator() as $fixture) {
$process = new Process('bin/console doctrine:database:import '.$fixture->getPathname());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment