use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Config\Definition\Exception\Exception;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Config\Definition\Exception\Exception;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Drupal\Console\Command\Shared\DatabaseTrait;
use Drupal\Console\Core\Utils\ConfigurationManager;
use Drupal\Console\Extension\Manager;
use Drupal\Console\Command\Shared\DatabaseTrait;
use Drupal\Console\Core\Utils\ConfigurationManager;
use Drupal\Console\Extension\Manager;
$this->trans('commands.site.install.questions.langcode'),
$languages,
$languages[$defaultLanguage]
$this->trans('commands.site.install.questions.langcode'),
$languages,
$languages[$defaultLanguage]
$this->trans('commands.migrate.setup.questions.db-type'),
array_column($databases, 'name')
);
$this->trans('commands.migrate.setup.questions.db-type'),
array_column($databases, 'name')
);
$this->trans('commands.migrate.execute.questions.db-file'),
'sites/default/files/.ht.sqlite'
);
$this->trans('commands.migrate.execute.questions.db-file'),
'sites/default/files/.ht.sqlite'
);
$input->setOption('db-host', $dbHost);
}
// --db-name option
$dbName = $input->getOption('db-name');
if (!$dbName) {
$input->setOption('db-host', $dbHost);
}
// --db-name option
$dbName = $input->getOption('db-name');
if (!$dbName) {
$input->setOption('db-name', $dbName);
}
// --db-user option
$dbUser = $input->getOption('db-user');
if (!$dbUser) {
$input->setOption('db-name', $dbName);
}
// --db-user option
$dbUser = $input->getOption('db-user');
if (!$dbUser) {
$input->setOption('db-user', $dbUser);
}
// --db-pass option
$dbPass = $input->getOption('db-pass');
if (!$dbPass) {
$input->setOption('db-user', $dbUser);
}
// --db-pass option
$dbPass = $input->getOption('db-pass');
if (!$dbPass) {
$input->setOption('db-pass', $dbPass);
}
// --db-port prefix
$dbPort = $input->getOption('db-port');
if (!$dbPort) {
$input->setOption('db-pass', $dbPass);
}
// --db-port prefix
$dbPort = $input->getOption('db-port');
if (!$dbPort) {
$input->setOption('db-pass', $database['default']['password']);
$input->setOption('db-port', $database['default']['port']);
$input->setOption('db-prefix', $database['default']['prefix']['default']);
$input->setOption('db-pass', $database['default']['password']);
$input->setOption('db-port', $database['default']['port']);
$input->setOption('db-prefix', $database['default']['prefix']['default']);
sprintf(
$this->trans('commands.site.install.messages.using-current-database'),
$database['default']['driver'],
sprintf(
$this->trans('commands.site.install.messages.using-current-database'),
$database['default']['driver'],
$this->trans('commands.site.install.questions.account-pass')
);
$input->setOption('account-pass', $accountPass);
$this->trans('commands.site.install.questions.account-pass')
);
$input->setOption('account-pass', $accountPass);
- $io = new DrupalStyle($input, $output);
- $uri = parse_url($input->getParameterOption(['--uri', '-l'], 'default'), PHP_URL_HOST);
+ $uri = parse_url($input->getParameterOption(['--uri', '-l'], 'default'), PHP_URL_HOST);
$schema = Database::getConnection()->schema();
$tables = $schema->findTables('%');
foreach ($tables as $table) {
$schema = Database::getConnection()->schema();
$tables = $schema->findTables('%');
foreach ($tables as $table) {
- $composerRoot = $drupalFinder->getComposerRoot();
- $drupalRoot = $drupalFinder->getDrupalRoot();
-
- $this->runInstaller($io, $input, $database, $uri);
+ $this->runInstaller($database, $uri);
* install files to be placed directly under /sites instead of the
* appropriate subdir when run from a script and a sites.php file exists.
*
* install files to be placed directly under /sites instead of the
* appropriate subdir when run from a script and a sites.php file exists.
*
$this->site->loadLegacyFile('/core/includes/install.core.inc');
$driver = (string)$database['driver'];
$this->site->loadLegacyFile('/core/includes/install.core.inc');
$driver = (string)$database['driver'];
try {
$autoload = $this->site->getAutoload();
install_drupal($autoload, $settings);
} catch (AlreadyInstalledException $e) {
try {
$autoload = $this->site->getAutoload();
install_drupal($autoload, $settings);
} catch (AlreadyInstalledException $e) {