adhocore / php-cli

PHP Console Application made easy- build great console apps with ease. Comes with Zero Dependency and Autocompletion support. Think of it as a PHP cli application framework.
https://github.com/adhocore/php-cli
MIT License
334 stars 35 forks source link

Wrong order of arguments when using application #95

Closed tbreuss closed 7 months ago

tbreuss commented 7 months ago

I noticed that when using the cli application and adding two or more arguments for a command, the ordering of the arguments in the help may differ from the setup.

This is what I configured for a certain command:

Bildschirmfoto 2024-01-22 um 14 44 13

And this is what the help for the given command outputs:

Bildschirmfoto 2024-01-22 um 14 44 52

It seems like the output of the help command orders the arguments by name ascending.

adhocore commented 7 months ago

oh that if true, seems like visual issue only. could you pls check if the functioning is as expected even though help output is different. thank you

tbreuss commented 7 months ago

oh that if true, seems like visual issue only. could you pls check if the functioning is as expected even though help output is different. thank you

It's only visual, not a big issue, but quite confusing if the order is mixed up and you trust the help.

I'm not sitting in front of the computer right now, but the problem could be found here: https://github.com/adhocore/php-cli/blob/main/src/Helper/OutputHelper.php#L200

adhocore commented 7 months ago

thanks for feedback, fixed in #97

tbreuss commented 7 months ago

thanks for feedback, fixed in #97

Thanks for your work!