cleo icon indicating copy to clipboard operation
cleo copied to clipboard

Fix required argument validation

Open jefersondaniel opened this issue 7 years ago • 0 comments

When a required argument is followed by an optional one, then the required argument is not validated. Example:

from cleo import Command


class HelloWorldCommand(Command):
    """
    Hello World Command

    app:hello_world
        {required_arg : Some required argument}
        {non_required_arg? : Some non required argument}
        {--option=5 : Some option that defaults to 5}
    """

    def handle(self):
        self.line('Hello world')

jefersondaniel avatar Jun 28 '18 12:06 jefersondaniel