From 0dd1d2f9f553771d0c4dd2d1679ca1f5399ef1f2 Mon Sep 17 00:00:00 2001 From: indykoning <15870933+indykoning@users.noreply.github.com> Date: Thu, 5 Sep 2024 10:09:40 +0200 Subject: [PATCH 1/2] Fix: Deprecated Functionality: Creation of dynamic property --- Model/Resolver/Stock.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Model/Resolver/Stock.php b/Model/Resolver/Stock.php index 61209f1..8f3d95e 100755 --- a/Model/Resolver/Stock.php +++ b/Model/Resolver/Stock.php @@ -17,10 +17,10 @@ class Stock implements ResolverInterface { public function __construct( - \Magento\Catalog\Api\ProductRepositoryInterface $productRepository, - \Magento\Customer\Model\Customer $customer, - \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\ProductAlert\Model\Stock $stock + protected \Magento\Catalog\Api\ProductRepositoryInterface $_productRepository, + protected \Magento\Customer\Model\Customer $_customer, + protected \Magento\Store\Model\StoreManagerInterface $_storeManager, + protected \Magento\ProductAlert\Model\Stock $_stock ) { $this->_productRepository = $productRepository; $this->_customer = $customer; From 21b7543ec2b01b580c69a07407363689ed1f0031 Mon Sep 17 00:00:00 2001 From: indykoning <15870933+indykoning@users.noreply.github.com> Date: Thu, 5 Sep 2024 10:11:06 +0200 Subject: [PATCH 2/2] Update Stock.php --- Model/Resolver/Stock.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Model/Resolver/Stock.php b/Model/Resolver/Stock.php index 8f3d95e..60901bf 100755 --- a/Model/Resolver/Stock.php +++ b/Model/Resolver/Stock.php @@ -22,10 +22,6 @@ public function __construct( protected \Magento\Store\Model\StoreManagerInterface $_storeManager, protected \Magento\ProductAlert\Model\Stock $_stock ) { - $this->_productRepository = $productRepository; - $this->_customer = $customer; - $this->_storeManager = $storeManager; - $this->_stock = $stock; } public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null)