Conversation
|
I'm not sure how the other commands are validated like MiddlewareCommand |
|
I think that validators should be attached to the models / information objects and not to the commands. I made a large PR where I introduced attributes that was rejected be @froemken so I would like him to review what direction we want to take this. |
|
See #96 |
|
Symfony Commands deliver a possibility to validate, normalize and auto-complete questions. As some questions should have auto-complete, some other questions use normalizer and validate or both or all three options I have created a solution called InputHandlers. It will group all assigned input handlers into there specific group (validation, normalize, auto-complete) and starts iterating through each class of each group. So, you can define 3 or 5 validators for just one question, 2 normalizers and the command will automatically outputs validation messages or the normalized value. So, no need to extend the command class itself with your own validator. Please use the original symfony validator possibilities I provide with Input Handlers. But yes, this system is not fully integrated until now. Have a look into Further ALL questions are currently collected in QuestionCollector. That's also NOT the final path. Each Command should get it's OWN QuestionCollector with JUST the questions valid for THIS specific command. Maybe I get time to get that finalized at weekend. I would wait with merging your patch. That's definitely something which we need in kickstarter. Thank you for your support. Do you want to update this patch afterward yourself, or should I overwrite your patch? Stefan |
I don't care. Whatever is better for you. |
No description provided.