-
Notifications
You must be signed in to change notification settings - Fork 10
Add purge to ProducerInterface #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d8228ac to
dc5bef3
Compare
d626d09 to
97cab30
Compare
src/Adapter/AdapterInterface.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the less specific PHPDoc argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personal preference as the type hint is for array, but happy to undo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I see. I'm sure it's fine then.
dc5bef3 to
8972b9b
Compare
|
looks good otherwise (not tested). |
e936770 to
86956d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the talk today, any thoughts on this @wpillar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are my thoughts:
ClientimplementsProducerInterfaceandClientInterface, so addingpurge()toProducerInterfacedoes not unreasonably affect that class.- You've already got segregated interfaces in
ProducerInterfaceandClientInterfaceand sinceClientimplements both, the only consideration really is how people might extend this code. Are we burdening people who might write separateProducerInterfaceimplementations with a method they can't implement? My thinking here is if we could reasonably assume that all queue implementations have a way of purging then it's fine to put this onProducerInterface, as a purge operation is similar to a send operation. If we think this assumption is unreasonable then you can segregate further with aPurgeableInterface.
What's your thinking on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thinking here is if we could reasonably assume that all queue implementations have a way of purging then it's fine to put this on ProducerInterface, as a purge operation is similar to a send operation.
So far it's 👌, but I doubt every queue implementation supports purging.
We're not 1.0.0, so I'm going to go with this and see what Mat thinks if he makes use of it.
86956d0 to
0da424b
Compare
Add purge to ProducerInterface
Initial draft for resolving #14.
Depends on / based off #15.
Adds the
purgemethod toProductInterface.