-
-
Notifications
You must be signed in to change notification settings - Fork 27
AbstractLock use Macroable #1045
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
Walkthrough在繁体中文文档中统一了“請求追蹤功能”为“請求跟蹤功能”,并在 Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (2)src/*/composer.json📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{json,toml}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (7)📚 Learning: 2025-12-12T05:33:43.947ZApplied to files:
📚 Learning: 2025-12-12T05:33:20.686ZApplied to files:
📚 Learning: 2025-12-12T05:33:20.686ZApplied to files:
📚 Learning: 2025-12-12T05:33:43.947ZApplied to files:
📚 Learning: 2025-12-12T05:33:43.947ZApplied to files:
📚 Learning: 2025-12-12T05:33:43.947ZApplied to files:
📚 Learning: 2025-12-12T05:33:43.947ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
🔇 Additional comments (1)
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/lock/src/Driver/AbstractLock.php (1)
24-25: Macroable trait 集成良好
Macroabletrait 的使用是正确的,它为AbstractLock启用了动态方法注册功能,不会破坏现有 API。这使得用户可以在运行时扩展锁的功能。建议在组件文档中添加关于 macroable 功能的使用说明,例如如何使用
AbstractLock::macro()方法注册自定义方法。
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
docs/zh-hk/components/telescope.md(1 hunks)docs/zh-tw/components/telescope.md(1 hunks)src/lock/src/Driver/AbstractLock.php(2 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
{docs/**/*,README*.md}
📄 CodeRabbit inference engine (AGENTS.md)
Keep code snippets in
docs/andREADME*.mdfiles current when components change
Files:
docs/zh-hk/components/telescope.mddocs/zh-tw/components/telescope.md
**/*.md
📄 CodeRabbit inference engine (AGENTS.md)
Markdown: Use ATX headings, fenced code blocks with language hints, and wrap lines near 100 chars
Files:
docs/zh-hk/components/telescope.mddocs/zh-tw/components/telescope.md
**/*.php
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.php: All PHP files must includedeclare(strict_types=1)at the top
Use PSR-12 coding standards for PHP code formatting
Use 4-space indentation with short array syntax in PHP code
Use.php-cs-fixer.phpconfiguration for PHP code formattingAll PHP files must include a strict_types declaration at the top
**/*.php: Follow project PHP coding standard enforced by php-cs-fixer with PSR-12 style, 4-space indentation, and short array syntax
Maintain type coverage by updating or adding tests when public APIs change; ensurecomposer test:typesstays green before pushing
Files:
src/lock/src/Driver/AbstractLock.php
src/**/src/**/*.php
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use namespace pattern
FriendsOfHyperf\{ComponentName}for all component classes
Files:
src/lock/src/Driver/AbstractLock.php
src/*/src/**/*.php
📄 CodeRabbit inference engine (CLAUDE.md)
src/*/src/**/*.php: Namespace convention for components must follow FriendsOfHyperf{ComponentName}
All code must be coroutine-safe and avoid global state without proper context management, blocking I/O operations, and non-coroutine-safe third-party libraries without wrappers
Use Hyperf's Context API for request-scoped data instead of global state
Follows PSR-12 coding standards and use PHP-CS-Fixer for automatic formatting
Use PHPStan at maximum level for static analysis
Ensure component namespace doesn't conflict with existing Hyperf components or other packages in the ecosystem
Integrate deeply with Hyperf's Dependency Injection container for service registration
Leverage Hyperf's AOP (Aspect-Oriented Programming) for cross-cutting concerns via aspects defined in ConfigProvider
Use Hyperf's Event System to register listeners for framework events in components
All code must support coroutine-based concurrency using Swoole/Swow compatibility
Files:
src/lock/src/Driver/AbstractLock.php
src/**/*.php
📄 CodeRabbit inference engine (AGENTS.md)
Each component lives in its own subdirectory with PSR-4 namespaces matching
FriendsOfHyperf\*
Files:
src/lock/src/Driver/AbstractLock.php
🔇 Additional comments (2)
docs/zh-tw/components/telescope.md (1)
53-53: 此文档更改与 PR 目标不一致该行仅是措辞更新(追蹤 → 跟蹤),但与 PR 标题"AbstractLock use Macroable"无关。建议将不相关的文档更新分离到单独的 PR 中,以保持 PR 的单一职责原则。
docs/zh-hk/components/telescope.md (1)
53-53: 此文档更改与 PR 目标不一致与
docs/zh-tw/components/telescope.md的更改相同,这是一个与 PR 主要目标无关的措辞更新。建议将这些文档更新移至单独的 PR。
* AbstractLock use Macroable * Update docs and translate * add composer dependencies --------- Co-authored-by: tw2066 <24579418+tw2066@users.noreply.github.com>
Summary by CodeRabbit
文档
重构
✏️ Tip: You can customize this high-level summary in your review settings.