From e3a3c2d57109bb24b46a39c6ff7085a9e09d638c Mon Sep 17 00:00:00 2001 From: Dieter Holvoet Date: Tue, 1 Feb 2022 14:35:36 +0100 Subject: [PATCH] Add a default value for the field widget choice in field:create (#5060) --- src/Drupal/Commands/field/FieldCreateCommands.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Drupal/Commands/field/FieldCreateCommands.php b/src/Drupal/Commands/field/FieldCreateCommands.php index 395b73baad..412100a894 100644 --- a/src/Drupal/Commands/field/FieldCreateCommands.php +++ b/src/Drupal/Commands/field/FieldCreateCommands.php @@ -315,7 +315,7 @@ protected function askFieldWidget(): string $choices[$name] = $label; } - return $this->io()->choice('Field widget', $choices); + return $this->io()->choice('Field widget', $choices, key($choices)); } protected function askRequired(): bool