commando
commando copied to clipboard
An Elegant CLI Library for PHP
It is impossible to pass negative numerical values to the parser - it results in the following errors: ```ERROR: Unable to parse option -112.45470: Invalid syntax```
Fixes #112, requires minimum PHP version to be 8.0
$ php composer.phar info | grep commando nategood/commando 0.4.0 PHP CLI Commando Style $ php -v PHP 8.1.1 (cli) (built: Dec 17 2021 23:49:52) (NTS) Copyright (c) The PHP Group...
It would be nice to be able to optionally supply CMD params or have a config file.
Options can be accessed using numeric keys, like `$command[0]`. It would be nice to reflect this in the docblock type, to please static analyzers.
By default when the help screen was printed the script is ended by `exit()`. There are cases were this behavior is undesired. The change allows to bypass this, the default...
Calling exit aborts the entire application making it difficult work around in some situations, such as during unit tests or when the outcome of an invocation should be logged. An...
Is it possible to access/use options with multiple words as input? ``` somecommand.php --countries usa gb fr ``` I tried it, but `$hello_cmd['countries']` returns just the first (in this case...
In the help screen, the title can be displayed instead of "arg 0". Add the same behavior on the error message when a required argument is missing.
Add class for holding constants which are common accross classes and performing simple value operations and comparisons. DEPRECATE the current constants, which are similar but use different naming and values...