Skip to content

feat(rate-limiter): add RateLimiter service, unit tests, and GitHub Actions CI - #2

Merged
Akisolu merged 5 commits into
mainfrom
feat/rate-limiter
Aug 11, 2026
Merged

feat(rate-limiter): add RateLimiter service, unit tests, and GitHub Actions CI#2
Akisolu merged 5 commits into
mainfrom
feat/rate-limiter

Conversation

@Akisolu

@Akisolu Akisolu commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Description

The Rate Limiting service powered by Redis is implemented to prevent abuse of anonymous feedback requests, along with the complete configuration of the unit test suite and CI pipeline in GitHub Actions.

Included Changes

  • RateLimiter Service (src/Services/RateLimiter.php):
  • Implementation of tooManyAttempts, hit, attempts, and resetAttempts on top of Predis.
  • Atomic expiration control (600s TTL by default) on the first request.
  • Unit Tests (tests/Unit/RateLimiterTest.php):
  • Full TDD coverage for verifying requests below the limit, blocking when exceeding it, and resetting counters.
  • Continuous Integration (.github/workflows/ci.yml):
  • Automation of executions with PHP 8.2+.
  • Orchestration of containerized services for PostgreSQL 15 and Redis 7.

Verification

  • Unit and integration tests executed locally with vendor/bin/phpunit (3/3 tests passed).
  • Autoloading validated according to the PSR-4 standard.
  • GitHub Actions pipeline executed successfully.

@Akisolu Akisolu self-assigned this Aug 11, 2026
@Akisolu
Akisolu merged commit e0c5307 into main Aug 11, 2026
1 check passed
@Akisolu Akisolu mentioned this pull request Aug 11, 2026
2 tasks
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.

1 participant