Repository navigation
fix(installer): stop CLI input loops on EOF - #2550
Merged
Merged
Conversation
(cherry picked from commit 8e43927) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Backport of #2547 to
3.5.x. Whenreadline()returnsfalseat EOF,choice()retries forever andask()turns it into an empty answer, so the required-field loops ofinstall/cli-install.phpspin 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
RuntimeExceptionon 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.xat 20d14aa plus this commit:php core/tests/standalone/CliInstallInputTest.php: passes on PHP 8.3.33 and 8.4.26.install/cli-install.php: fails withCLI input probe exceeded five seconds, so it catches the loop.tests/Unit/Installandtests/Unit/Console/SiteUpdateCommandTest.php: 141 passed.core/tests/standaloneis excluded fromphpunit.xmland no workflow runs it, on this branch or on3.6.x, so CI does not exercise the new test.🤖 Generated with Claude Code