Skip to content

fix(installer): stop CLI input loops on EOF - #2550

Merged
Seiger merged 1 commit into
evolution-cms:3.5.xfrom
elcreator:fix-cli-installer-eof-3.5
Nov 4, 2026
Merged

Seiger merged 1 commit into
evolution-cms:3.5.xfrom
elcreator:fix-cli-installer-eof-3.5

Conversation

@elcreator

Copy link
Copy Markdown

Problem

Backport of #2547 to 3.5.x. When readline() returns false at EOF, choice() retries forever and ask() turns it into an empty answer, so the required-field loops of install/cli-install.php spin at 100% CPU. An unattended install with closed stdin never ends: a database that is not ready yet is enough to get there. 3.5.9 has this.

Change

Cherry-pick of 8e43927, applied without conflicts, author kept. Both prompt methods throw a RuntimeException on EOF; the CLI entry point reports it and exits with status 1. A default still needs an actual empty input line.

Verification

On 3.5.x at 20d14aa plus this commit:

  • php core/tests/standalone/CliInstallInputTest.php: passes on PHP 8.3.33 and 8.4.26.
  • The same test with the old install/cli-install.php: fails with CLI input probe exceeded five seconds, so it catches the loop.
  • Pest tests/Unit/Install and tests/Unit/Console/SiteUpdateCommandTest.php: 141 passed.

core/tests/standalone is excluded from phpunit.xml and no workflow runs it, on this branch or on 3.6.x, so CI does not exercise the new test.

🤖 Generated with Claude Code

(cherry picked from commit 8e43927)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Seiger
Seiger merged commit 4d5902a into evolution-cms:3.5.x Nov 4, 2026
15 checks passed
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.

3 participants