All notable changes to maatify/rate-limiter will be documented in this file.
This project follows Semantic Versioning (SemVer).
- Initialized project structure without Docker.
- Added local
.env.exampleconfiguration. - Enabled local connectivity for:
- Redis
- MongoDB
- MySQL
- Created Composer configuration.
- Set up initial Continuous Integration skeleton.
- Prepared foundation for Phase 2 – Core Architecture.
RateLimiterInterfaceas the core contract.RateLimitActionEnumandPlatformEnum.RateLimitConfigfor default action configuration.RateLimitStatusDTOfor structured rate-limit responses.TooManyRequestsExceptionfor standardized blocking behavior.CoreStructureTest.phpfor architecture validation.
- Full implementation of:
RedisRateLimiterMongoRateLimiterMySQLRateLimiter
- Added driver integration test:
DriversTest.php
- Introduced:
RateLimitActionInterfacePlatformInterface
- Updated all enums to implement the new contracts.
- Refactored
RateLimiterInterfaceand all drivers to depend on interfaces instead of concrete enums.
- Improved reusability.
- Achieved full Open/Closed Principle compliance.
RateLimiterResolverfor dynamic driver resolution.RateLimitHeadersMiddleware(fully PSR-15 compatible).- Integrated response headers:
Retry-AfterX-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Reset
- Added
MiddlewareTestto validate:- Resolver correctness
- Header injection behavior
- Docker-based CI pipeline using:
docker-compose.ci.yml
- GitHub Actions workflow:
.github/workflows/ci.yml
- Integrated containers:
- Redis 7
- MySQL 8
- MongoDB 7
- Enabled live PHPUnit output streaming in CI logs.
- Automated
.envgeneration for CI environment. - Added Composer dependency caching.
- Enabled optional upload of test artifacts (
tests/_output).
- Full end-to-end integration testing environment completed.
- Adaptive exponential backoff using
2ⁿlogic. - Global per-IP rate limit across all actions.
- Extended
RateLimitStatusDTOwith:backoffSeconds→ adaptive delay in secondsnextAllowedAt→ timestamp for next allowed attempt
- Enhanced
TooManyRequestsExceptionto carry:- Retry metadata
- Backoff metadata
- New environment variables:
GLOBAL_RATE_LIMITGLOBAL_RATE_WINDOWBACKOFF_BASEBACKOFF_MAX
- Added
RateLimitStatusDTO::fromArray()for:- Cache reconstruction
- Database hydration
- Implemented global per-IP rate tracking for Redis.
- Updated resolver and all drivers to support:
- Backoff-aware status responses
- Added full backoff validation in:
tests/BackoffTest.php
- Validates:
- Backoff progression
- Maximum cap
- Timestamp formatting
- Added phase documentation:
docs/phases/README.phase5.md
All 1.0.0-alpha releases follow a strict phase-based stabilization roadmap.
Breaking changes are avoided between alpha phases unless strictly required for architectural correctness.
- Phase 6 – Advanced abuse detection strategies
- Phase 7 – Distributed lock coordination (optional)
- Phase 8 – Observability & metrics integration
© Maatify.dev — Unified Ecosystem for Modern PHP Libraries