docs: Add Phase 5.5 native PHP examples#9
docs: Add Phase 5.5 native PHP examples#9google-labs-jules[bot] wants to merge 2 commits intomainfrom
Conversation
- Added `examples/phase5_5/native/InMemoryDriver.php` helper class. - Added `examples/phase5_5/native/01_basic_flow.php` (Basic usage). - Added `examples/phase5_5/native/02_global_blocking.php` (Global limit blocking). - Added `examples/phase5_5/native/03_action_blocking.php` (Action limit blocking). - Added `examples/phase5_5/native/04_status_check.php` (Status check behavior). - Added `examples/phase5_5/examples.phase5_5.md` documentation. - Verified behavior against `src/` and `tests/` source of truth. Validation Report: - Source Files: `src/Resolver/EnforcingRateLimiter.php`, `src/DTO/RateLimitStatusDTO.php`, `src/Exceptions/TooManyRequestsException.php`, `src/Contracts/RateLimiterInterface.php`, `src/Resolver/ExponentialBackoffPolicy.php` - Tests: `tests/Phase5/GlobalLimiterTest.php`, `tests/Phase5/ActionLimiterTest.php`, `tests/Phase5/ExceptionPropagationTest.php` - Verified: EnforcingRateLimiter logic, DTO enrichment, Exception properties, Backoff calculation.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
- Added `examples/phase5_5/native/InMemoryDriver.php` helper class. - Added `examples/phase5_5/native/01_basic_flow.php` (Basic usage). - Added `examples/phase5_5/native/02_global_blocking.php` (Global limit blocking). - Added `examples/phase5_5/native/03_action_blocking.php` (Action limit blocking). - Added `examples/phase5_5/native/04_backoff_flow.php` (Backoff usage). - Added `examples/phase5_5/native/05_exception_handling.php` (Exception inspection). - Added `examples/phase5_5/examples.phase5_5.md` documentation. - All examples use `RateLimiterResolver` as the exclusive entry point. Validation Report: - Source Files: `src/Resolver/RateLimiterResolver.php`, `src/Resolver/EnforcingRateLimiter.php`, `src/DTO/RateLimitStatusDTO.php`, `src/Exceptions/TooManyRequestsException.php`. - Verified: All examples use `RateLimiterResolver::resolve()`. - Verified: Driver uses `key:action:platform` for keys. - Verified: EnforcingRateLimiter handles Global/Action logic.
This PR introduces Phase 5.5 documentation via native PHP examples.
Changes:
examples/phase5_5/native/directory.InMemoryDriverto simulate storage without external dependencies.status()proxies to the specific action/platform driver and does not check global limits.examples/phase5_5/examples.phase5_5.mdto index and explain the examples.Verification:
src/Resolver/EnforcingRateLimiter.phplogic.tests/Phase5/GlobalLimiterTest.phpandtests/Phase5/ActionLimiterTest.php.TooManyRequestsExceptionproperty usage matchestests/Phase5/ExceptionPropagationTest.php.EnforcingRateLimiteris the sole source of backoff calculation and DTOsourceenrichment.PR created automatically by Jules for task 312850244257613088 started by @Maatify