php-amqplib / RabbitMqBundle

RabbitMQ Bundle for the Symfony web framework
MIT License
1.22k stars 470 forks source link

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

Closed shadz3rg closed 1 year ago

shadz3rg commented 2 years ago

-> 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[bot] commented 1 year ago

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[bot] commented 1 year ago

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