mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-11-30 02:37:58 +08:00
Merge branch 'master' into db
This commit is contained in:
commit
e393dfc5c5
@ -8,6 +8,7 @@
|
||||
# Fixed
|
||||
|
||||
- [#271](https://github.com/hyperf-cloud/hyperf/pull/271) Fixed aop only rewrite the first method in classes and method patten is not work.
|
||||
- [#285](https://github.com/hyperf-cloud/hyperf/pull/285) Fixed anonymous class should not rewrite in proxy class.
|
||||
- [#286](https://github.com/hyperf-cloud/hyperf/pull/286) Fixed not auto rollback when forgotten to commit or rollback in multi transactions.
|
||||
|
||||
# v1.0.7 - 2019-07-26
|
||||
|
@ -92,7 +92,7 @@ class ProxyCallVistor extends NodeVisitorAbstract
|
||||
$usedNamespace[] = $classUse->name->toCodeString();
|
||||
}
|
||||
break;
|
||||
case $class instanceof Class_:
|
||||
case $class instanceof Class_ && ! $class->isAnonymous():
|
||||
$this->class = $class->name;
|
||||
if ($class->extends) {
|
||||
$this->extends = $class->extends;
|
||||
@ -124,7 +124,7 @@ class ProxyCallVistor extends NodeVisitorAbstract
|
||||
// Rewrite the method to proxy call method.
|
||||
return $this->rewriteMethod($node);
|
||||
break;
|
||||
case $node instanceof Class_:
|
||||
case $node instanceof Class_ && ! $node->isAnonymous():
|
||||
// Add use proxy traits.
|
||||
$stmts = $node->stmts;
|
||||
array_unshift($stmts, $this->buildProxyCallTraitUseStatement());
|
||||
|
@ -34,7 +34,7 @@ class ProxyClassNameVistor extends NodeVisitorAbstract
|
||||
public function leaveNode(Node $node)
|
||||
{
|
||||
// Rewirte the class name and extends the original class.
|
||||
if ($node instanceof Node\Stmt\Class_) {
|
||||
if ($node instanceof Node\Stmt\Class_ && ! $node->isAnonymous()) {
|
||||
$node->extends = $node->name;
|
||||
$node->name = new Node\Identifier($this->proxyClassName);
|
||||
return $node;
|
||||
|
Loading…
Reference in New Issue
Block a user