From a871f642f95df9cf5bc60d2592aeb8f0cfbb39da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gomis?= <97046219+Francois-Gomis@users.noreply.github.com> Date: Mon, 18 Nov 2024 15:30:36 +0100 Subject: [PATCH] fix : dynamic properties (#10) Fix Deprecated Functionality: Creation of dynamic property --- CHANGELOG.md | 4 ++++ Model/AlmaPlanDataProvider.php | 5 ++++ Model/Resolver/AlmaPlaceOrderOutput.php | 31 +++++++++++++++++-------- composer.json | 2 +- 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bad359b..1649dca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ CHANGELOG ========= +v0.3.3 +------ +* Fix Deprecated Functionality: Creation of dynamic property + v0.3.2 ------ * remove payment plan deferred_type and deferred_duration diff --git a/Model/AlmaPlanDataProvider.php b/Model/AlmaPlanDataProvider.php index 711ccca..977b807 100644 --- a/Model/AlmaPlanDataProvider.php +++ b/Model/AlmaPlanDataProvider.php @@ -11,6 +11,11 @@ */ class AlmaPlanDataProvider implements AdditionalDataProviderInterface { + /** + * @var Logger + */ + private $logger; + public function __construct( Logger $logger ) { diff --git a/Model/Resolver/AlmaPlaceOrderOutput.php b/Model/Resolver/AlmaPlaceOrderOutput.php index a1913df..1062d91 100644 --- a/Model/Resolver/AlmaPlaceOrderOutput.php +++ b/Model/Resolver/AlmaPlaceOrderOutput.php @@ -1,4 +1,5 @@ logger = $logger; - $this->eligibility = $eligibility; $this->almaPayment = $almaPayment; $this->orderFactory = $orderFactory; } @@ -35,11 +46,11 @@ public function __construct( * @throws GraphQlInputException */ public function resolve( - Field $field, - $context, + Field $field, + $context, ResolveInfo $info, - array $value = null, - array $args = null + array $value = null, + array $args = null ) { $orderModel = $this->orderFactory->create(); @@ -47,7 +58,7 @@ public function resolve( $orderId = $order->getId(); $url = $this->almaPayment->getPaymentUrl($orderId); - $this->logger->info('$url',[$url]); + $this->logger->info('$url', [$url]); return $url; } } diff --git a/composer.json b/composer.json index a64b88f..4599b47 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "magento/module-sales-graph-ql": ">=100.3.0" }, "type": "magento2-module", - "version": "0.3.2", + "version": "0.3.3", "license": [ "MIT" ],