All Versions
10
Latest Version
Avg Release Cycle
155 days
Latest Release
1613 days ago

Changelog History

  • v1.7.2 Changes

    November 26, 2019

    Compatibility with Symfony 5.

  • v1.7.1 Changes

    December 26, 2018

    ๐Ÿ“ฆ Lighter package when installed via Composer

  • v1.7.0 Changes

    November 18, 2017
    • ๐Ÿ‘ #44 Symfony 4 support
  • v1.6.0 Changes

    May 22, 2017

    ๐Ÿ‘ #33 & #39 Support PSR-11

    ๐Ÿ‘ #39 Support PHP 7.0 and up only

    ๐Ÿ’… #36 & #38 Allow to inject the SymfonyStyle object introduced in Symfony 2.8

    use \Symfony\Component\Console\Style\SymfonyStyle;...$app-\>command('greet', function (SymfonyStyle $io) {$io-\>write('hello');});
    
    • 0๏ธโƒฃ #34 & #35 Support default values for arguments/options with - in them:

      $console->command('import [number-of-clicks]', function ($numberOfClicks = 1) {var_dump($numberOfClicks); // prints 1});

  • v1.5.1 Changes

    September 16, 2016

    ๐Ÿ‘ป #27, #28, #29: Throw an explicit exception when commands are registered as static calls to non static method calls.

    Wrong way:

    $this-\>application-\>command('greet', ['MyClass', 'foo']);class MyClass {public function foo() { ... }}
    

    ๐Ÿ‘ป That will now correctly throw an exception.

    This should be used instead:

    $this-\>application-\>command('greet', [new MyClass(), 'foo']);
    

    ๐Ÿ“„ Or you can use dependency injection with an autowiring container (http://mnapoli.fr/silly/docs/dependency-injection.html), for example with PHP-DI: http://mnapoli.fr/silly/docs/dependency-injection.html That way you don't have to change your code.

  • v1.5.0 Changes

    August 31, 2016

    ๐Ÿš€ 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) {// ...});
    
  • v1.4.0 Changes

    August 13, 2016

    ๐Ÿ‘ #23 and #24 Support defining command aliases

  • v1.3.1 Changes

    August 01, 2016
    • #22 Make the descriptions() setter fluent
  • v1.3.0 Changes

    February 27, 2016

    #20: compatibility with Symfony 3.x as well as 2.x.

  • v1.2.0 Changes

    February 01, 2016

    ๐Ÿ‘Œ Improvements

    #17 Run a sub-command easily with runCommand(), for example:

    $app-\>command('init', function ($input, $output) {$this-\>runCommand('db:drop --force', $output)$this-\>runCommand('db:create', $output)$this-\>runCommand('db:fixtures --verbose', $output)});
    

    ๐Ÿ›  Bugfixes

    • #19 Exit codes returned by commands were not returned by the application