Problem/Motivation
When troubleshooting and reviewing issues on different core branches I've following workflow
git checkout 11.x
composer install
php -d memory_limit=256M core/scripts/drupal quick-start standard
# Above command will install Drupal and generate random password. Due to #3271178 this will hang up randomly, so I must do following:
# 1. go to http://127.0.0.1:8888/user/1/edit and change "Email address" domain to valid one and change password to something that is easy to remember/static so the browser password manager can use it.
# 2. ctrl+c on terminal
php -d memory_limit=256M -S localhost:8888 .ht.router.php
I understand this workflow is just a work-a-round for #3271178: Quick start command installation stops responding, but since that issue is going to take time to fix, I'd like to get password option so the workflow could be minified to:
git checkout 11.x
composer install
php -d memory_limit=256M core/scripts/drupal quick-start standard --password=123
# ctrl+c on terminal
php -d memory_limit=256M -S localhost:8888 .ht.router.php
Steps to reproduce
Proposed resolution
Add password option to Drupal\Core\Command\InstallCommand
Remaining tasks
- MR
- Acceptance for idea
- Tests
- RTBC
- Profit
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3458167
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:
- 3458167-install-cmd-with-password
changes, plain diff MR !8591
Comments
Comment #3
sokru commentedComment #4
sokru commentedComment #5
smustgrave commentedComment #6
andypostNice idea
Comment #7
andypostNeeds work for test and I left nitpick improvement
Comment #8
sokru commentedAdded one test to assert the password is echoed correctly on Quick Start command. Otherwise I feel its very hard to test the actual login without converting the relevant tests (QuickStartTest and TestSiteApplicationTest) into browser tests.
Therefore I removed the "Needs tests", but feel free to re-add the tag with more information about desired tests.
Comment #9
prashant.cDoes this command
php -d memory_limit=256M core/scripts/drupal quick-start standardnot work withddevOn a fresh clone on Drupal
11.x, did addev ssh, tried the above command, and got the following error for providing the database details in the settings file.Am I missing or doing something wrong here?
Please suggest.
Comment #10
sokru commentedThe attached error message shows (not very clearly) that the SQLite3 version provided by the DDEV is lower than required version.
Comment #11
prashant.c@sokru Sorry my bad did not realise this is DDEV specific issue not with this.
Comment #12
andypostFor DDEV there was issue, just upgrade it https://github.com/ddev/ddev/issues/6110#issuecomment-2081525413
Comment #13
prashant.c@andypost
Finally, the ddev issue was resolved, I was already on the latest ddev version but still, it was taking SQLite as
3.40.The command I used to refresh the docker container fixed the issue
ddev debug refresh. Hope this will help others facing a similar issue.Tested the
passwordparameter and site installation worked fine along with the password was set as the supplied password.DDEV command
ddev exec -d /var/www/html php core/scripts/drupal quick-start standard --password=123For DDEV replace the
http://127.0.0.1:8888with your site domain.I think good for RTBC.
Comment #14
andypostCreated CR https://www.drupal.org/node/3465079
Looks nothing to be done here except final FM review and commiters
Comment #15
quietone commentedThis change, if accepted, should also be included on the wiki page, https://www.drupal.org/docs/getting-started/installing-drupal/drupal-qui...
I made a recommendation on the MR, setting to needs work for that.
Comment #16
sokru commentedAdded the recommendation to MR. I don't see any draft workflow on wiki page, so I assume updating the documentation should be done only after MR has been merged.
Comment #17
smustgrave commentedBelieve that is the case with documentation pages. Right @quietone?
Comment #18
quietone commentedComment #19
quietone commentedAdd 'to' to title
Comment #22
catchCommitted/pushed to 11.x, thanks!
Still needs documentation updates.
Comment #23
sokru commentedI gave some thought on documentation page update, but I'd say its better to leave as simple as possible. The documentation page gives the instructions for "--help" flag for quick-start command, and that shows the instructions for all the options, including the password option.