Skip to content

Releases: clue/commander

v1.4.0

07 Dec 16:20
Compare
Choose a tag to compare

v1.3.0

11 Aug 09:27
Compare
Choose a tag to compare
  • 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)

v1.2.2

03 Jul 13:18
Compare
Choose a tag to compare
  • Fix: Assume argv to be empty if not present (non-CLI SAPI mode)
    (#23 by @clue)

  • Improve test suite by adding PHPUnit to require-dev and ignoring HHVM build errors for now.
    (#21 and #22 by @clue)

v1.2.1

14 Nov 18:23
Compare
Choose a tag to compare
  • Fix: Use casted filter value for options with boolean values
    (#20 by @clue)

v1.2.0

07 Nov 08:55
Compare
Choose a tag to compare
  • 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)

v1.1.0

06 Nov 11:41
Compare
Choose a tag to compare
  • Feature: Support alternative groups and optional parentheses
    (#15 by @clue)
  • Fix: Fix multiple arguments, only skip whitespace inbetweeen once
    (#16 by @clue)

v1.0.0

05 Nov 12:31
Compare
Choose a tag to compare
  • 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.

v0.2.0

05 Nov 12:12
Compare
Choose a tag to compare
v0.2.0 Pre-release
Pre-release
  • Feature / BC break: Add support for long and short options with or without option values
    (#8, #11,# 12 by @clue)
  • Feature: More flexible recursive parser with support for optional keywords and required attributes
    (#9, #10 by @clue)

v0.1.0

14 Oct 12:40
Compare
Choose a tag to compare
v0.1.0 Pre-release
Pre-release
  • First tagged release