Problem/Motivation

Part of #3582246: [meta] CLI in Core community initiative.

Split from #2894476: [PP-1] Provide commands which are helpful for core development.

Steps to reproduce

Read Working on a Drupal Core CLI Command Issue for testing setup, then

  1. Ensure that site path settings.php is removed
  2. Ensure that site path files are removed
  3. Test the quick-start command: ./vendor/bin/dr quick-start minimal
  4. Repeat steps 1-2
  5. Test the install command ddev exec dr install --db-url mysql://db:db@db/db standard
  6. Visit installed site
  7. Log in with administrative credentials provided by the command output.

Proposed resolution

The install command should be usable in production scenarios using any database driver to install a real site.

Remaining tasks

New Tests?

User interface changes

No

Introduced terminology

No. db-url is already known terminology.

API changes

The install command has a new required option.
The quick-start command provides the default value for this option without any changes.

Data model changes

No

Release notes snippet

To be determined.

Issue fork drupal-3594342

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mradcliffe created an issue. See original summary.

mradcliffe’s picture

Status: Active » Needs work
Issue tags: +Needs issue summary update

I applied my latest patch/merge request diff, updated to main branch. I didn't include the test.

I still need to replace the driver -> namespace.

mondrake’s picture

I would suggest to use a db url instead. Or even better, do #3533038: Introduce a ConnectionParameters value object to store database connection parameters first and then introduce a JSON format for the db connection parameters, and use that.

That would allow not ‘hardcoding’ the database configuration into multiple CLI options that need maintenance (and will never be enough, think transaction mode, mysql sockets, you name it) and validation (sqlite does not require user, password, server).

mradcliffe’s picture

Issue summary: View changes
Issue tags: -Needs issue summary update
mradcliffe’s picture

Issue summary: View changes