Fixed bug.

This commit is contained in:
李铭昕 2019-01-31 17:34:28 +08:00
parent 483166c0bf
commit ae2a5c4193
3 changed files with 23 additions and 19 deletions

View File

@ -43,6 +43,7 @@
},
"replace": {
"hyperf/amqp": "self.version",
"hyperf/cache": "self.version",
"hyperf/config": "self.version",
"hyperf/constants": "self.version",
"hyperf/contract": "self.version",
@ -72,6 +73,7 @@
],
"psr-4": {
"Hyperf\\Amqp\\": "src/amqp/src/",
"Hyperf\\Cache\\": "src/cache/src/",
"Hyperf\\Config\\": "src/config/src/",
"Hyperf\\Constants\\": "src/constants/src/",
"Hyperf\\Contract\\": "src/contract/src/",
@ -109,6 +111,7 @@
"hyperf": {
"config": [
"Hyperf\\Amqp\\ConfigProvider",
"Hyperf\\Cache\\ConfigProvider",
"Hyperf\\Config\\ConfigProvider",
"Hyperf\\Devtool\\ConfigProvider",
"Hyperf\\DbConnection\\ConfigProvider",

View File

@ -52,5 +52,4 @@ class AnnotationCollector extends MetadataCollector
{
return static::get($class . '._c.' . $annotation);
}
}

View File

@ -80,7 +80,8 @@ trait ProxyTrait
{
$aspects = AspectCollector::get('classes');
$matchAspect = [];
foreach ($aspects as $aspect => [$rule]) {
foreach ($aspects as $aspect => $rules) {
foreach ($rules as $rule) {
if (strpos($rule, '*') !== false) {
$preg = str_replace(['*', '\\'], ['.*', '\\\\'], $rule);
$pattern = "/^${preg}$/";
@ -103,6 +104,7 @@ trait ProxyTrait
}
}
}
}
return array_unique($matchAspect);
}