Skip to content

Commit

Permalink
Rename middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
sasa-b committed Feb 3, 2023
1 parent c1ccb2f commit e3eea3c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Each command will be passed through a chain of Middlewares. By default the chain
some Middleware out of the box:
* **EventMiddleware** - raises events before and after handling a command or query, and on failure
* **TransactionMiddleware** - runs individual _Commands_ or _Queries_ in a Transaction, `begin`, `commit` and `rollback` steps are plain `\Closure` objects, so you can use whichever ORM or Persistence approach you prefer.
* **EmptyResponseMiddleware** - throws an Exception if anything aside from null is returned in _Command_ responses to enforce the _Command-Query Segregation_
* **EmptyCommandResponseMiddleware** - throws an Exception if anything aside from null is returned in _Command_ responses to enforce the _Command-Query Segregation_
* **ImmutableResponseMiddleware** - throws an Exception if you have properties without _readonly_ modifier defined on your response objects

To create your own custom middleware you need to implement the `SasaB\MessageBus\Middleware` interface and provide it
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"message-bus",
"cqrs"
],
"version": "1.5.3",
"version": "1.6.0",
"license": "MIT",
"authors": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use SasaB\MessageBus\Message;
use SasaB\MessageBus\Middleware;

final class EmptyResponseMiddleware implements Middleware
final class EmptyCommandResponseMiddleware implements Middleware
{
public function __invoke(Message $message, \Closure $next): mixed
{
Expand Down

0 comments on commit e3eea3c

Please sign in to comment.