-
-
Notifications
You must be signed in to change notification settings - Fork 27
refactor: remove unused PendingClosureDispatch class #1001
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
Conversation
- Remove `PendingClosureDispatch` class in favor of `PendingAsyncQueueDispatch` - Add `onConnection()` alias method to `PendingAsyncQueueDispatch` for backward compatibility - Update all documentation to reference `PendingAsyncQueueDispatch` - Update test files to use `PendingAsyncQueueDispatch` and correct property references - Remove dedicated `PendingClosureDispatch` test files This change simplifies the codebase by using the shared `PendingAsyncQueueDispatch` class from the Support package, eliminating code duplication while maintaining the same functionality and API compatibility.
|
Warning Rate limit exceeded@huangdijia has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 55 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (9)
Walkthrough该PR将异步队列分发API从 Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 需要特别关注的区域:
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The onConnection method was removed from PendingAsyncQueueDispatch in favor of using onPool directly. All test cases have been updated to replace onConnection calls with onPool to maintain consistency and avoid method duplication.
Replaces all instances of the onConnection method with onPool in async queue closure job documentation for consistency with the latest API usage.
Replaces references to `onConnection` with `onPool` in the Chinese documentation for consistency with the API. Adds formatting improvements to the English documentation for better readability.
Updated documentation to use the onPool method instead of onConnection for specifying queue connections, reflecting API changes and improving consistency in examples and method descriptions.
Replaces references and documentation for the onConnection method with onPool in all language versions. Clarifies that onPool sets the queue connection name and removes duplicate/alias documentation for consistency.
* refactor: remove unused PendingClosureDispatch class - Remove `PendingClosureDispatch` class in favor of `PendingAsyncQueueDispatch` - Add `onConnection()` alias method to `PendingAsyncQueueDispatch` for backward compatibility - Update all documentation to reference `PendingAsyncQueueDispatch` - Update test files to use `PendingAsyncQueueDispatch` and correct property references - Remove dedicated `PendingClosureDispatch` test files This change simplifies the codebase by using the shared `PendingAsyncQueueDispatch` class from the Support package, eliminating code duplication while maintaining the same functionality and API compatibility. * Update docs and translate * Remove onConnection method in PendingAsyncQueueDispatch The onConnection method was removed from PendingAsyncQueueDispatch in favor of using onPool directly. All test cases have been updated to replace onConnection calls with onPool to maintain consistency and avoid method duplication. * Update docs to use onPool instead of onConnection Replaces all instances of the onConnection method with onPool in async queue closure job documentation for consistency with the latest API usage. * Update async queue closure job docs for method naming Replaces references to `onConnection` with `onPool` in the Chinese documentation for consistency with the API. Adds formatting improvements to the English documentation for better readability. * Replace onConnection with onPool in async queue docs Updated documentation to use the onPool method instead of onConnection for specifying queue connections, reflecting API changes and improving consistency in examples and method descriptions. * Update docs and translate * Update async queue job docs to use onPool method Replaces references and documentation for the onConnection method with onPool in all language versions. Clarifies that onPool sets the queue connection name and removes duplicate/alias documentation for consistency. * Update docs and translate * 删除 AsyncQueueClosureJob 相关的测试文件以简化代码库 * 添加 AsyncQueueClosureJob 的功能测试,验证 dispatch 方法及其链式调用 --------- Co-Authored-By: Deeka Wong <8337659+huangdijia@users.noreply.github.com>
Summary
This PR removes the unused
PendingClosureDispatchclass and consolidates functionality to usePendingAsyncQueueDispatchfrom the Support package.Changes
Removed Files
src/async-queue-closure-job/src/PendingClosureDispatch.php- Unused wrapper classtests/AsyncQueueClosureJob/PendingClosureDispatchTest.php- Dedicated test filetests/AsyncQueueClosureJob/PendingClosureDispatchSimpleTest.php- Dedicated test fileModified Files
Core Changes:
src/async-queue-closure-job/src/Functions.php- Updateddispatch()to returnPendingAsyncQueueDispatchsrc/support/src/Bus/PendingAsyncQueueDispatch.php- AddedonConnection()alias for backward compatibilityTest Updates:
PendingAsyncQueueDispatchinstead ofPendingClosureDispatchconnectiontopoolto match the actual property nameDocumentation Updates:
Benefits
onConnection()alias methodTest Results
All 59 tests pass with 172 assertions:
Type analysis also passes with no errors.
Summary by CodeRabbit
发布说明
突破性变更
PendingClosureDispatch改为PendingAsyncQueueDispatchonConnection()改为onPool()dispatch()函数返回类型更新为新的PendingAsyncQueueDispatch类文档