Skip to content

Commit

Permalink
[docs] update the readme file (#18)
Browse files Browse the repository at this point in the history
* chore(docs): make it friendly

- remove comparison.
- remove the ambiguous business logic wording

* chore(deps): require php>=8.1

* chore(docs): add packagist stats
  • Loading branch information
imdhemy authored Mar 7, 2024
1 parent 8250116 commit 68d11d3
Show file tree
Hide file tree
Showing 5 changed files with 313 additions and 286 deletions.
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
# Symblaze Console

Symfony comes with a powerful console framework that eases the creation of command line interfaces, however,
configuring the console command options and arguments can be a bit tedious, especially because you have to write
multiple lines of code for each command you want to create, and that configuration is not part of the business logic
that you want to implement.
<div align="center">

Symblaze Console is a library that allows you to configure your console commands using the Symfony `AsCommand`
attribute. It's inspired by the Laravel Artisan console, and it's built on top of the Symfony console component.
<img alt="Packagist PHP Version Support" src="https://img.shields.io/packagist/php-v/symblaze/console">

<a href="https://packagist.org/packages/imdhemy/laravel-purchases">
<img src="https://img.shields.io/packagist/v/symblaze/console.svg?style=flat-square" alt="Latest Version on Packagist">
</a>

## ❌ Before 😝
<a href="https://packagist.org/packages/imdhemy/laravel-purchases/stats">
<img src="https://img.shields.io/packagist/dt/symblaze/console.svg?style=flat-square" alt="Total Downloads">
</a>

![Before](docs/before.png)
</div>

- Multiple lines of code for each command.
- Multiple imports that doesn't belong to the business logic.
- A Configuration method that doesn't belong to the business logic.
Symfony provides a robust console system that simplifies the development of command line interfaces.
However, setting up the console command parameters and options can be somewhat tedious and repetitive.

## ✅ After 💅
Symblaze Console is a library that allows you to configure your console commands using the Symfony `AsCommand`
attribute with a fluent interface.

![After](docs/after.png)
![Symblaze Console screenshot](docs/screenshot.png)

- A single line of code for each command.
- No configuration method.
- Focus on the business logic.

## Installation

Expand Down
6 changes: 6 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
}
],
"require": {
"php": ">=8.1",
"symfony/console": "*"
},
"require-dev": {
Expand All @@ -30,5 +31,10 @@
"test": "./vendor/bin/phpunit --testdox",
"cs-check": "vendor/bin/php-cs-fixer fix --dry-run --diff --verbose",
"cs-fix": "php-cs-fixer fix --verbose"
},
"config": {
"platform": {
"php": "8.1"
}
}
}
Loading

0 comments on commit 68d11d3

Please sign in to comment.