fix: pollora:install completes without a terminal - #377
Merged
Merged
Conversation
Missing options get working defaults when the command cannot prompt; a generated admin password is shown once.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Found while checking #297–#301 on a fresh v13.34.0 install:
pollora new --ddev --no-interaction(CLI v1.2.2) ends withThe CLI runs
pollora:installwith no option and no terminal. Symfony then marks the input non-interactive, Laravel Prompts falls back to each prompt's default (empty), and therequiredrule aborts. With CLI v1.1.1 the same failure was silent — the CLI announced success on a site without WordPress installed.Change
InstallationConfig::withDefaults(): keeps every option given, fills the rest — title from the project directory (acme-site→Acme Site),admin,admin@<APP_URL host>(elseexample.com), a generated 20-character password,en_US, not indexed.pollora:installuses it whenever it cannot prompt; interactive runs are unchanged (fromPrompts()).--installmode, where it would otherwise be lost. A password passed as an option is never printed.Tests
Three new cases in
LaunchPadInstallCommandTest(defaults, password shown once, options kept and not echoed); the first two fail on the old code. Full suite 1371 green, PHPStan 0, Rector clean.The CLI side (forwarding
--no-interaction) is a separate PR on Pollora/cli.