Skip to content

improve loop #199

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

Closed

Conversation

RafaelMarchand
Copy link

@RafaelMarchand RafaelMarchand commented Apr 3, 2025

Provide a boolean feedback whether the loop function was exited after timLimit was exceeded or the queue was empty

@Namoshek
Copy link
Collaborator

Namoshek commented Apr 4, 2025

This change should be non-breaking for normal users but it is breaking for users extending the MqttClient class or interface. I'm fine with that, yet I would suggest not to return a boolean but an enum with the exact reason (there is more than two, and potentially more in the future). That would also require changing the minimum required PHP version to 8.1, which is fine, since 8.0 is EOL anyway.

Do you want to implement those changes or should I?

@RafaelMarchand
Copy link
Author

RafaelMarchand commented Apr 4, 2025

According to chatGPT returning enums would break the code for people that use this library with php <8.1, including my use case. So it might be better to return strings although less clean.

@Namoshek
Copy link
Collaborator

Namoshek commented Apr 4, 2025

I'm not going to sacrifice code quality and maintainability to support a PHP version that is end-of-life for over a year already.

@Namoshek
Copy link
Collaborator

I'm going to close this as a solution has been discussed in #200. If I'm ever going to release another major version, I might implement this feature though. The use cases might be rare, but conceivable.

@Namoshek Namoshek closed this Apr 14, 2025
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.

2 participants