From cbf14e1f9656768ca93eff4f90c2e8bc4bdfe439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Planchat?= Date: Tue, 21 Nov 2023 16:42:56 +0100 Subject: [PATCH] Updated code to be compatible with php-etl/action-contracts:0.2 --- src/ActionState.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ActionState.php b/src/ActionState.php index 2e3f106..a9fdd4a 100644 --- a/src/ActionState.php +++ b/src/ActionState.php @@ -10,19 +10,27 @@ final class ActionState implements StateInterface { private string $status = 'pending'; + public function __construct( + private readonly StateInterface $decorated + ) { + } + public function initialize(): void { $this->status = 'running'; + $this->decorated?->initialize(); } public function success(): void { $this->status = 'success'; + $this->decorated?->success(); } public function failure(): void { $this->status = 'failure'; + $this->decorated?->failure(); } public function observeState(): callable