From b52bc91aaa2c735cecf0072669371d624fa5013b Mon Sep 17 00:00:00 2001 From: Robert Landers Date: Sun, 14 Jan 2024 14:12:30 +0100 Subject: [PATCH] create with spy proxy --- src/State/OrchestrationHistory.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/State/OrchestrationHistory.php b/src/State/OrchestrationHistory.php index 63bc9ab8..3aa065f4 100644 --- a/src/State/OrchestrationHistory.php +++ b/src/State/OrchestrationHistory.php @@ -1,7 +1,7 @@ constructed ??= ($this->config->factory ? ($this->config->factory)($this->instance->instanceId) : null) ?? $class->newInstanceWithoutConstructor(); $proxyGenerator = ($this->config->factory ? ($this->config->factory)(OrchestratorProxy::class) : new OrchestratorProxy()); + $spyGenerator = ($this->config->factory ? ($this->config->factory)(SpyProxy::class) : new SpyProxy()); try { $taskScheduler = null; yield static function (EventDispatcherTask $task) use (&$taskScheduler) { $taskScheduler = $task; }; - $context = new OrchestrationContext($this->instance, $this, $taskScheduler, $proxyGenerator); + $context = new OrchestrationContext($this->instance, $this, $taskScheduler, $proxyGenerator, $spyGenerator); try { $result = ($this->constructed)($context); } catch (Unwind) {