Skip to content

Commit a402fc4

Browse files
authored
Merge pull request #1 from pioniro/fix-void-proxy-method
Refactor handler iteration in WrapperFactory
2 parents 07f60f2 + 5c6571d commit a402fc4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Service/WrapperFactory.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@ public function <methodName>(<methodParameters>) <methodReturnType>
5757
$f = fn() => parent::<methodName>(<methodArguments>);
5858
$args = func_get_args();
5959
60-
foreach ($this->__handlers['<methodName>'] ?? [] as [$handler, $annotation]) {
60+
foreach ($this->__handlers['<methodName>'] ?? [] as &$h) {
61+
[$handler, $annotation] = $h;
62+
if (is_string($annotation)) {
63+
$annotation = unserialize($annotation);
64+
$h[1] = $annotation;
65+
}
6166
$f = $handler->handle($f, __METHOD__, $args, $annotation);
6267
}
6368
$f();

0 commit comments

Comments
 (0)