thephpleague / climate

PHP's best friend for the terminal.
http://climate.thephpleague.com
MIT License
1.87k stars 126 forks source link

Add a method to access trailing args as array #158

Closed johnpbloch closed 4 years ago

johnpbloch commented 4 years ago

When using trailing arguments to pass remaining info on to another command, it would be helpful to have the arguments preserved as an array rather than a concatenated string. This pull request adds a new method to the Manager and Parser class for accessing trailing arguments as an array. It does not modify how the string value is currently handled for trailing arguments, since that would be a backwards compatibility break and require an appropriate semver increment. In the future, these duplicate values could be merged (and trailing arguments properly escaped before concatenation) as part of a backwards-incompatible change in the next major version.

If you would like me to resubmit without duplicating the properties, please let me know. I just thought I'd submit the most compatible change first and revise if requested.

Thanks for your work on this project, and for your time here!

duncan3dc commented 4 years ago

Great work @johnpbloch this will be in the next release, thanks!