Problem/Motivation
We want a delightful UX with our new CLI in core. That means guiding the user via prompts when user input is needed. Symfony Console provides good tools here. Laravel Prompts is a Composer package that builds on that, with even better tools.
Drush has been using Prompts for years without any complaints or dependency conflicts (it has no dependencies beyond symfony/console). Prompts is backed by a company with considerable resources (Laravel). Prompts has never had an SA. Like Drush, CLI users are already considered superusers so it is immune to many common vulnerabilities found in web code.
A few examples which are unlocked with this library:
- A slick search prompt where user is shown an auto-filtering select menu as the user types. Use cases are picking a module to install in ex:install or picking a single config item to view or import via config:get/config:import-single
- A form where users can go forward or backward among the questions. Useful for code generation, creating a field instance, etc.
- Run long processes with a live-updating spinner, scrolling log output, and stable success, warning, and error messages that stick around. Update the label as the task progresses. See comments on this tweet.
Comments
Comment #2
moshe weitzman commentedComment #3
moshe weitzman commentedComment #4
nicxvan commentedHere are the steps we need for the dependency evaluation.
https://www.drupal.org/about/core/policies/core-dependency-policies/depe...