From 5c6571d90ccce9a11d3522900de9ae7262a846f3 Mon Sep 17 00:00:00 2001 From: Alexey Date: Wed, 8 Oct 2025 18:33:41 +0200 Subject: [PATCH] Refactor handler iteration in WrapperFactory --- src/Service/WrapperFactory.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Service/WrapperFactory.php b/src/Service/WrapperFactory.php index 963e779..c8dbd91 100644 --- a/src/Service/WrapperFactory.php +++ b/src/Service/WrapperFactory.php @@ -57,7 +57,12 @@ public function () $f = fn() => parent::(); $args = func_get_args(); - foreach ($this->__handlers[''] ?? [] as [$handler, $annotation]) { + foreach ($this->__handlers[''] ?? [] as &$h) { + [$handler, $annotation] = $h; + if (is_string($annotation)) { + $annotation = unserialize($annotation); + $h[1] = $annotation; + } $f = $handler->handle($f, __METHOD__, $args, $annotation); } $f();