Skip to content

Refactor: rename bus middleware interface and improve type-hint#9

Merged
lindyhopchris merged 3 commits intonextfrom
refactor/remove-message-middleware-interface
Apr 8, 2024
Merged

Refactor: rename bus middleware interface and improve type-hint#9
lindyhopchris merged 3 commits intonextfrom
refactor/remove-message-middleware-interface

Conversation

@lindyhopchris
Copy link
Copy Markdown
Member

Previously the MessageMiddlewareInterface type-hinted MessageInterface. This was incorrect - because the middleware returns a result, it can only be used with command or query messages, not integration events.

The middleware interface has been renamed BusMiddlewareInterface which is more descriptive of its purpose. The message type-hint has been changed from MessageInterface to CommandInterface|QueryInterface, which again is more accurate.

@lindyhopchris lindyhopchris self-assigned this Apr 5, 2024
@lindyhopchris
Copy link
Copy Markdown
Member Author

Needs to be squash merged as I missed updating the closure signature on the interface in the first commit.

Comment thread docs/guide/application/commands.md Outdated
Comment thread src/Bus/Middleware/LogBusDispatch.php
@lindyhopchris lindyhopchris merged commit 0c3ce00 into next Apr 8, 2024
@lindyhopchris lindyhopchris deleted the refactor/remove-message-middleware-interface branch April 8, 2024 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant