Skip to content

fix: pollora:install completes without a terminal - #377

Merged
ogorzalka merged 3 commits into
developfrom
fix/install-without-prompts
Sep 30, 2026
Merged

ogorzalka merged 3 commits into
developfrom
fix/install-without-prompts

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

Problem

Found while checking #297–#301 on a fresh v13.34.0 install: pollora new --ddev --no-interaction (CLI v1.2.2) ends with

Starting WordPress installation...
Site title is required
php artisan pollora:install failed.

The CLI runs pollora:install with no option and no terminal. Symfony then marks the input non-interactive, Laravel Prompts falls back to each prompt's default (empty), and the required rule 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> (else example.com), a generated 20-character password, en_US, not indexed.
  • pollora:install uses it whenever it cannot prompt; interactive runs are unchanged (fromPrompts()).
  • A generated password is printed once — also in --install mode, 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.

Missing options get working defaults when the command cannot prompt;
a generated admin password is shown once.
@ogorzalka
ogorzalka merged commit 5faa578 into develop Sep 30, 2026
11 checks passed
@ogorzalka
ogorzalka deleted the fix/install-without-prompts branch September 30, 2026 14:33
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

Successfully merging this pull request may close these issues.

1 participant