Skip to content

Add replayable prompt workflows and multi-select commands - #10

Merged
wazabii8 merged 15 commits into
mainfrom
develop
Nov 30, 2026
Merged

wazabii8 merged 15 commits into
mainfrom
develop

Conversation

@wazabii8

Copy link
Copy Markdown
Contributor

Changes

  • Use Command for individual questions and output, including multi-select menus that return the same option keys in a terminal or through piped input. Input and output streams can now be configured independently.
  • Use Prompt::runDefinition() to run an installer from a stored array. It checks nested steps before asking the first question and can run the same definition again without consuming the existing prompt queue.
  • Restore terminal settings after interrupted input, call progress callbacks once per frame, and align table columns containing styled or multibyte text.

Compatibility

Existing method names remain callable. In trusted PHP workflows, the legacy validate callback still returns true to request another answer. The new validator callback returns true to accept one. The migration guide covers these contracts and the preferred method names.

Verification

  • All five jobs passed on the proposed head, covering Ubuntu PHP 8.2–8.5 and Windows PHP 8.4. Ubuntu PHP 8.4 passed 232 checks in both plain and color modes. Windows passed 227 checks with the Unix pseudo-terminal group skipped. CI run
  • Psalm reported zero errors. The downstream Unitary suite passed 415 checks in both modes with one intentional skip. Both executable demos and all seven documentation examples ran successfully.
  • The Windows job covers piped input. Interactive password masking still needs a check in a native Windows console.

@wazabii8
wazabii8 merged commit d0a4876 into main Nov 30, 2026
10 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.

1 participant