Skip to content
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

ConsumerInterface service is not valid value for RPC server callback #697

Closed
shadz3rg opened this issue Sep 7, 2022 · 2 comments
Closed

Comments

@shadz3rg
Copy link

shadz3rg commented Sep 7, 2022

-> package documentation declare term callback
-> callback is valid Symfony service
-> callback should implement \OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface
technically, there is no instance validation, any object with execute method will be valid, but this is not documented
(https://github.com/php-amqplib/RabbitMqBundle/blob/a86783b2cf8653872eb895d12dda29f9c3f2f139/DependencyInjection/OldSoundRabbitMqExtension.php)
-> callback::execute should return int|false, and this signature is not compatible with RPC server callback (which should return response data)

While signature is not breaking functionality for now, IDE and static analyzers having troubles with that.
IMO there should be introduced separate ServerInterface and documented as possible callback for RPC section.

@github-actions
Copy link

github-actions bot commented Dec 6, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions
Copy link

This issue was closed because it has been stalled for 10 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant