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
- Ensure that site path settings.php is removed
- Ensure that site path files are removed
- Test the quick-start command:
./vendor/bin/dr quick-start minimal
- Repeat steps 1-2
- Test the install command
ddev exec dr install --db-url mysql://db:db@db/db standard
- Visit installed site
- 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.
Comments
Comment #3
mradcliffeI 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.
Comment #4
mondrakeI 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).
Comment #5
mondrakeComment #6
mradcliffeComment #7
mradcliffe