All Notable changes to guzzle-advanced-throttle
will be documented in this file.
Updates should follow the Keep a CHANGELOG principles.
- Nothing
- Nothing
- Nothing
- Nothing
- Nothing
- fix wrong method call in
LaravelAdapter
- PHP 8 support
- PHP 7 support
This fixes a security vulnerabilities in symfony/http-foundation
and symfony/http-kernel
:
- https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/http-foundation/CVE-2019-18888.yaml
- https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/http-kernel/CVE-2019-18887.yaml
Ensure compatibility to Laravel 6.0
.
Updated external dependencies.
This fixes a security vulnerability in symfony/http-foundation
:
Simplified and hardened error status code detection.
- Compatibility with Laravel / Illuminate 5.8
- Upgraded PHPUnit to version 8
- Dropped support for PHP 7.1
This should solve the issue where one had to use (string) $response->getBody()
instead of $response->getBody()->getContents()
.
You can disable caching for empty responses in the config now by setting allow_empty
to false
.
Check out the docs for more information on how to set it.
- Fixed a problem when generating the cache key for a request without parameters
This release adds compatibility with Laravel 5.7 (Illuminate).
The order of request parameters is now irrelevant for the cache. If the values of the parameters are the same, the requests will be treated as the same, too.
For example if you request /test?a=1&b=2
,
the cache will know that it yields the same response as /test?b=2&a=1
.
- The request count was not properly reset because
RateLimiter::getCurrentRequestCount()
wasn't used internally.
Thanks to @huisman303 for finding this!
-
You can now provide a custom caching strategy instead of being limited to the default ones.
Your custom caching strategy must implement
CacheStrategy
. It is suggested you useCacheable
for a parent class. This will give a good head start, seeForceCache
andCache
for ideas.To use your custom caching strategy, you'll need to pass the fully qualified cache name to
RequestLimitRuleset
.$rules = new RequestLimitRuleset([ ... ], MyCustomCacheStrategy::class, 'array', new Repository(...)); $throttle = new ThrottleMiddleware($rules);
Thanks to @LightGuard
- The middleware can now be called as a function instead of calling the
handle
method.
$throttle = new ThrottleMiddleware($rules);
$stack->push($throttle());
- Fixed issue in Redis driver
- Fixed problems with Laravel cache drivers
There was a problem in the composer.json that for example broke the compatibility to Drupal 8. This is fixed in this release.
Thanks to @berenddeboer !
- Support for Laravel 5.5
- Respect request parameters (query or body) for caching
- Do not only cache responses with status code 200 but rather filter out responses with error status codes: 4xx, 5xx
- Possibility to define the TTL for the cache in the config
- Simplified the config format of the laravel cache adapter
- Possibility to configure the laravel cache adapter
- Host not recognized
Initial release