From a3c192492cc3b36a27e484f1db5e3b38f4018974 Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Sun, 26 Feb 2023 21:47:20 +0100 Subject: [PATCH] Set hydrator in webhook constructor --- src/Generator/WebHook.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Generator/WebHook.php b/src/Generator/WebHook.php index 2308a2a..f23230f 100644 --- a/src/Generator/WebHook.php +++ b/src/Generator/WebHook.php @@ -42,6 +42,14 @@ public static function generate(string $namespace, string $event, SchemaRegistry ), new Node\Expr\Variable('requestSchemaValidator'), ) + )->addStmt( + new Node\Expr\Assign( + new Node\Expr\PropertyFetch( + new Node\Expr\Variable('this'), + 'hydrator' + ), + new Node\Expr\Variable('hydrator'), + ) ); $class->addStmt($constructor);