mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-11-29 18:27:44 +08:00
Fixed bug that Hyperf\RateLimit\Aspect\RateLimitAnnotationAspect::getWeightingAnnotation()
cannot work. (#6374)
Co-authored-by: xiechenghua <chenghua.xie@ehang.com> Co-authored-by: 李铭昕 <715557344@qq.com>
This commit is contained in:
parent
5f22575ae8
commit
d11c018daf
@ -3,6 +3,7 @@
|
||||
## Fixed
|
||||
|
||||
- [#6372](https://github.com/hyperf/hyperf/pull/6372) Fixed bug that AOP not working when using variadic parameters.
|
||||
- [#6374](https://github.com/hyperf/hyperf/pull/6374) Fixed bug that `RateLimitAnnotationAspect::getWeightingAnnotation()` cannot work when using config `rate_limit.storage`.
|
||||
|
||||
## Added
|
||||
|
||||
|
@ -86,7 +86,13 @@ class RateLimitAnnotationAspect implements AroundInterface
|
||||
*/
|
||||
public function getWeightingAnnotation(array $annotations): RateLimit
|
||||
{
|
||||
$property = array_merge($this->annotationProperty, $this->config);
|
||||
$property = $this->annotationProperty;
|
||||
foreach ($this->annotationProperty as $key => $value) {
|
||||
if (! empty($this->config[$key])) {
|
||||
$property[$key] = $this->config[$key];
|
||||
}
|
||||
}
|
||||
|
||||
/** @var null|RateLimit $annotation */
|
||||
foreach ($annotations as $annotation) {
|
||||
if (! $annotation) {
|
||||
|
Loading…
Reference in New Issue
Block a user