Silly alternatives and similar libraries
Based on the "Micro Frameworks" category.
Alternatively, view Silly alternatives based on common mentions on social networks and blogs.
-
Csrf Component
Csrf Package provides Cross Site Request Forgery protection by comparing provided token with session token to ensure request validity.
CodeRabbit: AI Code Reviews for Developers
Do you think we are missing an alternative of Silly or a related project?
Popular Comparisons
README
currentMenu: home
Silly CLI micro-framework based on Symfony Console.
Professional support for Silly is available via Tidelift
Installation
$ composer require mnapoli/silly
Usage
Example of a Silly application:
use Symfony\Component\Console\Output\OutputInterface;
$app = new Silly\Application();
$app->command('greet [name] [--yell]', function ($name, $yell, OutputInterface $output) {
$text = $name ? "Hello, $name" : "Hello";
if ($yell) {
$text = strtoupper($text);
}
$output->writeln($text);
});
$app->run();
Running the application is the same as running any other Symfony Console application:
$ php application.php greet
Hello
$ php application.php greet john --yell
HELLO JOHN
$ php application.php greet --yell john
HELLO JOHN
Silly\Application
extends Symfony\Console\Application
and can be used wherever Symfony's Application can.
Documentation
- [Command definition](docs/command-definition.md)
- [Command callables](docs/command-callables.md)
- [Console helpers](docs/helpers.md)
- [Dependency injection](docs/dependency-injection.md)
- [The PHP-DI edition](docs/php-di.md)
- [The Pimple edition](docs/pimple.md)
Do more
Silly is just an implementation over the Symfony Console. Read the Symfony documentation to learn everything you can do with it.
Example applications
Interested in seeing examples of Silly applications? Have a look at this short selection:
Contributing
See the [CONTRIBUTING](CONTRIBUTING.md) file.