Skip to content

Commit 10aea65

Browse files
authored
Merge pull request #3509 from kitsunet/task/more-proxy-parent-class-fixes
TASK: More adjustments to correctly check parent class chains in proxies
2 parents 32fc628 + 513bbc2 commit 10aea65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ public function buildProxyClass(string $targetClassName, array &$aspectContainer
463463
$proxyClass->getMethod('__clone')->addPreParentCallCode($callBuildMethodsAndAdvicesArrayCode);
464464

465465
if (!$this->reflectionService->hasMethod($targetClassName, '__wakeup')) {
466-
$proxyClass->getMethod('__wakeup')->addPostParentCallCode(" if (method_exists(get_parent_class(\$this), '__wakeup') && is_callable([parent::class, '__wakeup'])) parent::__wakeup();\n");
466+
$proxyClass->getMethod('__wakeup')->addPostParentCallCode(" if (method_exists(parent::class, '__wakeup') && is_callable([parent::class, '__wakeup'])) parent::__wakeup();\n");
467467
}
468468

469469
$proxyClass->addTraits(['\\' . AdvicesTrait::class]);
@@ -532,7 +532,7 @@ protected function addBuildMethodsAndAdvicesCodeToClass(string $className, Class
532532
return $treatedSubClasses;
533533
}
534534

535-
$callBuildMethodsAndAdvicesArrayCode = " if (method_exists(get_parent_class(\$this), 'Flow_Aop_Proxy_buildMethodsAndAdvicesArray') && is_callable([parent::class, 'Flow_Aop_Proxy_buildMethodsAndAdvicesArray'])) parent::Flow_Aop_Proxy_buildMethodsAndAdvicesArray();\n";
535+
$callBuildMethodsAndAdvicesArrayCode = " if (method_exists(parent::class, 'Flow_Aop_Proxy_buildMethodsAndAdvicesArray') && is_callable([parent::class, 'Flow_Aop_Proxy_buildMethodsAndAdvicesArray'])) parent::Flow_Aop_Proxy_buildMethodsAndAdvicesArray();\n";
536536
$proxyClass->getConstructor()->addPreParentCallCode($callBuildMethodsAndAdvicesArrayCode);
537537
$proxyClass->getMethod('__wakeup')->addPreParentCallCode($callBuildMethodsAndAdvicesArrayCode);
538538

0 commit comments

Comments
 (0)