getConnectionInfoFromInteractiveShell example

$container = $this->container = $this->getApplication()->getContainer();

        $container->offsetGet('shopware.notify')->doTrackEvent('Installer started');

        if ($this->IOHelper->isInteractive()) {
            $this->printStartMessage();
        }

        $connectionInfo = new DatabaseConnectionInformation();
        $connectionInfo = $this->getConnectionInfoFromConfig(SW_PATH . '/config.php', $connectionInfo);
        $connectionInfo = $this->getConnectionInfoFromArgs($input$connectionInfo);
        $connectionInfo = $this->getConnectionInfoFromInteractiveShell(
            $this->IOHelper,
            $connectionInfo
        );

        /** @var ConfigWriter $configWriter */
        $configWriter = $this->container->offsetGet('config.writer');
        $configWriter->writeConfig($connectionInfo);

        $conn = $this->initDatabaseConnection($connectionInfo$container);
        $databaseService = new DatabaseService($conn);

        
Home | Imprint | This part of the site doesn't use cookies.