Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[site:install] Add a --db-url option #3907

Closed
mondrake opened this issue Jul 10, 2018 · 3 comments
Closed

[site:install] Add a --db-url option #3907

mondrake opened this issue Jul 10, 2018 · 3 comments

Comments

@mondrake
Copy link
Contributor

mondrake commented Jul 10, 2018

Problem/Motivation

With Testing framework does not work with contributed database drivers, in Drupal 8.6.x a new set of methods has been introduced to convert DB URLs back and forth to database connection arrays.

While that's meant for testing, it would be great to enable a --db-url option for site install - the value passed in can be split by Drupal core in the relevant components without needing to pass all the separate --db-user, --db-pass etc. options.

The good thing is that it will be the same URL used to specify the value of the SIMPLETEST_DB variable in testing, so CI tools could unify on a single variable to specify installation and testing.

Example:

drupal site:install  standard  \
--langcode="en"  \
--db-url="mysql://u53rn4m3:[email protected]:3306/drupal8"  \
--site-name="Drupal 8"  \
--site-mail="[email protected]"  \
--account-name="admin"  \
--account-mail="[email protected]"  \
--account-pass="p455w0rd"
@hjuarez20
Copy link
Contributor

hjuarez20 commented May 21, 2019

Hi @mondrake, We already implemented db-url as an argument in #3917 and #4051.

This will be available to the next release.

@mondrake
Copy link
Contributor Author

Great! I was watching that :)

Please see #4048 for an issue, and #4049 for a suggested improvement.

@mondrake
Copy link
Contributor Author

This can be closed now, I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants