protected function execute(InputInterface $input, OutputInterface $output)
 {
     $io = new ConsoleIO($input, $output, $this->getHelperSet());
     $container = $this->getContainer();
     $ezMagicService = new EzMagicService($io, $container);
     $ezMagicService->validate();
     $ezMagicService->setupDatabase();
     $ezMagicService->checkDatabase();
 }
示例#2
0
 public static function setupEzMagic(Event $event)
 {
     $io = $event->getIO();
     $extra = $event->getComposer()->getPackage()->getExtra();
     // Prepare Doctrine Annotations
     $rootDir = rtrim(getcwd(), '/') . '/' . trim($extra['symfony-app-dir'], '/');
     $loader = (require_once "{$rootDir}/../vendor/autoload.php");
     AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
     $container = self::getContainer($event);
     $ezMagicService = new EzMagicService($io, $container);
     $ezMagicService->validate();
     $ezMagicService->setupDatabase();
     $ezMagicService->checkDatabase();
 }