Repository navigation
v0.2.0
This release simplifies the public API and removes several unnecessary metadata abstractions.
Breaking changes
RateLimitmetadata is now added directly toextraProperties- Multiple
RateLimitentries can be declared naturally and are composed together - Resource-level and operation-level limits now combine instead of replacing each other
- Removed
DynamicLimit,DynamicCost,DynamicBucket,Identity, andCondition - Dynamic values now use typed resolver class names via
class-string<T> - Dynamic buckets now use the explicit
bucketResolveroption - Removed the custom
Intervalvalue object; use strings or nativeDateInterval - Removed the
RateLimitCheckinglifecycle event
Improvements
-
Simplified identity and condition composition
-
Clarified bucket vs identity semantics for tenant-aware limits
-
Fixed misleading tenant quota documentation
-
Made
symfony/security-coreoptional- authenticated Symfony users are rate limited by user identity when Security is installed
- applications without Symfony Security fall back cleanly to client IP
-
Reduced metadata boilerplate and internal complexity
Example:
new Post(
extraProperties: [
new RateLimit(
limit: 100,
interval: '1 minute',
),
new RateLimit(
limit: 1_000,
interval: '1 hour',
),
new RateLimit(
limit: 10_000,
interval: '1 day',
),
],
)