Skip to content

[Messenger] Fix integration with newer versions of Pheanstalk #60308

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

Merged
merged 1 commit into from
May 8, 2025

Conversation

HypeMC
Copy link
Contributor

@HypeMC HypeMC commented May 1, 2025

Q A
Branch? 7.3
Bug fix? yes
New feature? no
Deprecations? no
Issues -
License MIT

Follow-up to #60040.

When I updated the Pheanstalk library, I missed the fact that version 4 internally tracked the used/watched tube. This was removed in newer versions, so now every call to useTube() or watch() sends a command to Beanstalkd, leading to unnecessary bandwidth consumption.

This PR adds simple tracking logic to avoid redundant calls to those functions.

@carsonbot carsonbot added this to the 7.3 milestone May 1, 2025
@HypeMC HypeMC changed the title [Messenger] Fix integration with newer version of Pheanstalk [Messenger] Fix integration with newer versions of Pheanstalk May 1, 2025
@@ -520,4 +606,5 @@ public function testSendWithRoundedDelay()

interface PheanstalkInterface extends PheanstalkPublisherInterface, PheanstalkSubscriberInterface, PheanstalkManagerInterface
{
public function disconnect(): void;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version 5 doesn't include this method in any of its interfaces (probably to avoid a BC break), but the implementation does. Version 7 adds it to the interface.

@fabpot
Copy link
Member

fabpot commented May 8, 2025

Thank you @HypeMC.

@fabpot fabpot merged commit 0040477 into symfony:7.3 May 8, 2025
9 of 11 checks passed
@HypeMC HypeMC deleted the fix-pheanstalk-7-integration branch May 8, 2025 07:12
@fabpot fabpot mentioned this pull request May 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants