Skip to content

1.5.0

Choose a tag to compare

@mnapoli mnapoli released this 31 Aug 11:06
· 91 commits to master since this release

This release contains improvements on command arguments and options, by @thecrypticace:

  • Allow options to have default values (#25, documentation)

    $app->command('greet [--age=]', function ($age) {
        // ...
    })->defaults([
        'age' => 25,
    ]);;
  • Default values can now be inferred from the callable's parameters (#25, documentation)

    $app->command('greet [name] [--age=]', function ($name = 'John', $age = 25) {
        // ...
    });
  • Fixed: matching arguments and options containing hyphens (#26, documentation)

    $app->command('run [--dry-run]', function ($dryRun) {
        // ...
    });