Feature gnu compatibility
Created by: tflori
With the gnu compatibility it is now possible to have
- empty string operands
php app.php ""
- empty string options
php app.php -a ""
- spaces in front of operands beginning with a hypen or double hypen
php app.php " --" " -"
- options after operands
php app.php command -q
This also brings a breaking change. Before every option after an operand was used as operand. In the example above this means that -q
was an operand. This operand is now an option and therefore the parser checks that there is an option q
- if not it throws an UnexpectedValueException
.
This will solve #39 (closed)