clue/commander
Minimal, pragmatic console framework for PHP. Define commands with arguments/options, get automatic help/usage output, and run apps via a simple dispatcher. Lightweight alternative to Symfony Console for building small CLI tools quickly.
.gitattributes to exclude dev files from exports.
Add PHP 8 support, update to PHPUnit 9 and simplify test setup.
(#26 by @andreybolonin, #27 and #28 by @SimonFrings and #29 by @clue)Feature: Add support for custom filter callbacks (#25 by @clue)
$tokenizer = new Tokenizer();
$tokenizer->addFilter('ip', function ($value) {
return filter_var($ip, FILTER_VALIDATE_IP);
});
$tokenizer->addFilter('lower', function (&$value) {
$value = strtolower($value);
return true;
});
$router = new Router($tokenizer);
$router->add('add <name:lower>', function ($args) { });
$router->add('--search=<address:ip>', function ($args) { });
Improve test suite by locking Travis distro so new future defaults will not break the build (#24 by @clue)
Feature: Add support for predefined filters to limit accepted values and avoid requiring double dash separator (#19 by @clue)
Feature: Support preset option values, option values now accept any tokens (#17 by @clue)
Feature: Unify handling ellipses after any token and whitespace around option values (#17 by @clue)
First stable release, now following SemVer
Improve documentation and usage examples
Contains no other changes, so it's actually fully compatible with the v0.2.0 release.
How can I help you explore Laravel packages today?