pwfisher / commandline.php Goto Github PK
View Code? Open in Web Editor NEWPHP Command Line interface class. Provides friendly and flexible CLI argument parsing.
License: Other
PHP Command Line interface class. Provides friendly and flexible CLI argument parsing.
License: Other
Hi.
Currently the only available way to use the tool through packagist is using dev-master as version. Could you tag a version so libraries are not forced to setup composer with minimum-stability dev?
Thank you very much.
composer.json file is useless until you create pwfisher/command-line-php package on packagist.org
Please, create it.
$hello_cmd = new Commando\Command();
$hello_cmd->option('t')
->aka('title')
->describedAs('When set, use this title to address the person')
->must(function($title) {
var_dump($title); // this line 33, always print NULL
$titles = array('Mister', 'Mr', 'Misses', 'Mrs', 'Miss', 'Ms');
return in_array($title, $titles);
})
dont work:
php /srv/bitrix/batches/user_generation.php --title=Mister
/srv/bitrix/batches/user_generation.php:33: NULL
ERROR: Invalid value, , for option t
PHP 5.6.32 (cli)
Why doesn't the example work?
It seems this file is not used. I removed it and the tests are green ...
I think it could be fine to avoid checking if the key is set on the parse() result.
So $options['whatever'] is null without warning about undefined index error or using the ugly @.
Don't you think so ?
If you set an argument with an empty string you get a "PHP Notice: Uninitialized string offset" because the code tries to check for the String first character.
eg:
$ php somescript.php --argument ""
Hi, it would be nice if this project could be added to my project as dependency via composer. If you are interested, I can prepare a pull request.
Now, when we have phpunit tests, we should use the travis-ci to automate the unit testing process.
I can prepare the .travis.yml file and help you with setup.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.