Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List state values command #5771

Open
gitressa opened this issue Sep 29, 2023 · 0 comments
Open

List state values command #5771

gitressa opened this issue Sep 29, 2023 · 0 comments

Comments

@gitressa
Copy link
Contributor

Is your feature request related to a problem? Please describe.

You can list the state values with this:

$ drush sql:query "SELECT name FROM key_value WHERE collection='state'";
comment.maintain_entity_statistics
comment.node_comment_statistics_scale
install_task
install_time
node.min_max_update_time
router.path_roots
[...]

From https://www.drupal.org/docs/8/api/state-api/overview#s-access-state-values-with-drush

Describe the solution you'd like

It would be nice to be able to list the current states with a Drush command instead, like this.

drush state:list

Or perhaps show a selectable list, like config:get does, when run without a parameter?

$ drush state:get
 Choose a configuration:
  [0] comment.maintain_entity_statistics
  [1] comment.node_comment_statistics_scale
  [...]
  [22] twig_extension_hash_prefix
  [23] update.last_check
  [24] update.last_email_notification
  [25] views.view_route_names
 >
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

No branches or pull requests

1 participant