- Issue created by @koppie
- πΊπΈUnited States koppie
Update: I think the problem may be caused specifically by my use of the
askHidden
method! Per Symfony documentation:It's very similar to the ask() method but the user's input will be hidden and it cannot define a default value. Use it when asking for sensitive information ...
OK - so,
ask
is different fromaskHidden
... so I guess the answer is to modify the schema specifically foraskHidden
. - πΊπΈUnited States koppie
Update 2: Rather than update the schema, all we need is to modify the logic in the
ConsoleInputCollector
class.Before
$arguments += [ 'default' => $default_value, ];
After
if ($method !== 'askHidden') { $arguments += [ 'default' => $default_value, ]; }
I tested it locally and it worked:
I'm going to open up an MR (unless someone stops me)!
- πΊπΈUnited States koppie
Update 3: Never mind, I was looking in the wrong place! For the record: this project is for documentation (which does not need to be changed in this case). In fact, the issue has already been fixed in Drupal core: π askHidden prompt fails with "Unknown named parameter $default" Active
Closing this ticket as "duplicate."