Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Silly Laravel Package

mnapoli/silly

Silly is a lightweight CLI micro-framework built on Symfony Console. Define commands with simple signatures and PHP callables, get options/arguments parsing, helpers, and DI integration (PHP-DI or Pimple) while staying compatible with Symfony Console apps.

View on GitHub
Deep Wiki
Context7
1.10.0

What's Changed

New Contributors

Full Changelog: https://github.com/mnapoli/silly/compare/1.9.1...1.10.0

1.9.1

What's Changed

New Contributors

Full Changelog: https://github.com/mnapoli/silly/compare/1.9.0...1.9.1

1.9.0

What's Changed

New Contributors

Full Changelog: https://github.com/mnapoli/silly/compare/1.8.3...1.9.0

1.8.3

What's Changed

New Contributors

Full Changelog: https://github.com/mnapoli/silly/compare/1.8.2...1.8.3

1.8.2

What's Changed

Full Changelog: https://github.com/mnapoli/silly/compare/1.8.1...1.8.2

1.8.1

Bugfixes

New Contributors

Full Changelog: https://github.com/mnapoli/silly/compare/1.8.0...1.8.1

1.8.0

What's Changed

New Contributors

Full Changelog: https://github.com/mnapoli/silly/compare/1.7.3...1.8.0

1.7.3
1.7.2

Compatibility with Symfony 5.

1.7.1

Lighter package when installed via Composer

1.7.0
  • #44 Symfony 4 support
1.6.0
  • #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');
});
  • #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
});
1.5.1

#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.

1.5.0

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) {
        // ...
    });
    
1.4.0

#23 and #24 Support defining command aliases

1.3.1
  • #22 Make the descriptions() setter fluent
1.3.0

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

1.2.0

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
1.1.1

Use the new php-di/invoker package, which removes a warning when installing Silly.

1.1.0

New documentation and website: http://mnapoli.fr/silly/

1.0.0

First stable release.

Changes since v0.2:

  • #6 Changed the syntax to be closer to Symfony help/man pages
0.2.0

0.x versions do not keep backward compatibility.

  • Added support for setting command descriptions
  • Added support for setting arguments & options default values
  • More consistent syntax (BC breaks!):
    • options with array values are now defined like this: --option=* (was previously [--option=]*
    • options with optional values (--option=?) have been removed as they are completely buggy and unusable in Symfony…
  • Added documentation on how using helpers
0.1.0

0.x versions do not keep backward compatibility.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope