Skip to content

Commit

Permalink
TASK: Fix AdvicedConstructorInterceptorBuilder
Browse files Browse the repository at this point in the history
The method `buildMethodParametersCode` does not exist and most likely `$proxyMethod->buildMethodParametersCode` is meant.

> This dates back to Andi and I believe the solution is as simple as this being
> $proxyMethod->setMethodParametersCode($proxyMethod->buildMethodParametersCode($declaringClassName, $methodName, true));

> Which becomes even clearer looking at the sibling code in AdvicedMethodInterceptorBuilder where it is like I suggested

neos/flow-development-collection#3218 (comment)
  • Loading branch information
mhsdesign committed Nov 7, 2023
1 parent 75666db commit e067069
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Classes/Aop/Builder/AdvicedConstructorInterceptorBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@ public function build(string $methodName, array $interceptedMethods, string $tar
$declaringClassName = $interceptedMethods[$methodName]['declaringClassName'];
$proxyMethod = $this->compiler->getProxyClass($targetClassName)->getConstructor();
if ($declaringClassName !== $targetClassName) {
/**
* @phpstan-ignore-next-line "buildMethodParametersCode" does not exist, and never has since the introduction of this call:
* https://github.com/neos/flow-development-collection/commit/1e7938342d7a40852328116f8fde9a91f1028836
* Eventually this code will be removed with Neos 9 but im too afraid to touch any of it ^^
*/
$proxyMethod->setMethodParametersCode($this->buildMethodParametersCode($declaringClassName, $methodName, true));
$proxyMethod->setMethodParametersCode($proxyMethod->buildMethodParametersCode($declaringClassName, $methodName, true));
}

$groupedAdvices = $interceptedMethods[$methodName]['groupedAdvices'];
Expand Down

0 comments on commit e067069

Please sign in to comment.