Skip to content

Conversation

@huangdijia
Copy link
Member

Summary

  • Relaxed the PHPDoc type hint for the $message parameter in the getCallback() method from MessageInterface to MessageInterface|mixed

Motivation

This change improves type compatibility following the recent result handling implementation added in commit 196f346. The method needs to handle cases where the message parameter might not strictly be a MessageInterface instance, as evidenced by the instanceof check on line 114.

Changes

  • Updated PHPDoc annotation in src/async-queue/src/Driver/Driver.php:108

Test plan

  • Existing tests should pass
  • Type compatibility is improved without breaking existing functionality

Updated the PHPDoc type hint for the `$message` parameter in the
`getCallback()` method from `MessageInterface` to `MessageInterface|mixed`
to better reflect the actual usage pattern and improve type compatibility
with the recent result handling implementation.
@limingxinleo limingxinleo merged commit f083e90 into hyperf:master Nov 6, 2025
74 checks passed
@huangdijia huangdijia deleted the fix/async-queue-callback-type-hint branch November 6, 2025 12:46
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