Problem/Motivation
In \Drupal\Core\Recipe\ConsoleInputCollector::collectValue, when the method is ask and the value is integer (or generally not a string), then the call to $this->io->$method(...$arguments); throws an exception because the second value needs to be a string.
Proposed resolution
Always cast the default value to string, if the method is "ask".
Issue fork drupal-3559632
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
jurgenhaasComment #4
phenaproximaSmall suggestion for clarity, and a request for a comment.
But otherwise, this is an easy RTBC from me.
Comment #5
jurgenhaasI've tried various ways with the test but can't figure out a way to make it work. I'm currently writing a float value in a config object which will be used as default input for the recipe. However, this fails with the error "No schema for config_test.types" whereas the missing schema doesn't seem to be an issue when the recipe writes to that config.
I'm running out of ideas for now, unfortunately.
Comment #6
phenaproximaI have some ideas!
Comment #7
phenaproximaConverted it to a more tightly-scoped test that doesn't need to interact with config at all.
Comment #8
godotislateTest looks good and shows the int -> string conversion. I also confirmed that test-only job fails as expected.
Comment #9
alexpottCommitted and pushed 98172e7a3df to 11.x and 7e79d8d3d86 to 11.3.x. Thanks!
Backported to 11.3.x as a bug fix.