Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hgati/8fc917aec82b4259116f87c61dd3c51b to your computer and use it in GitHub Desktop.
Save hgati/8fc917aec82b4259116f87c61dd3c51b to your computer and use it in GitHub Desktop.
Magento2 Envbar Patch
From fad911581bc224c64db7ce1f95bd8eb1acf7aa13 Mon Sep 17 00:00:00 2001
From: Dennis <cobays@gmail.com>
Date: Wed, 25 Oct 2023 11:44:23 +0900
Subject: [PATCH] Declare class property to fix issue in PHP 8.2
---
Helper/Data.php | 15 +++++++++++++++
Observer/Adminhtml/AddCss.php | 10 ++++++++++
2 files changed, 25 insertions(+)
diff --git a/Helper/Data.php b/Helper/Data.php
index eea858d..3f14a5b 100644
--- a/Helper/Data.php
+++ b/Helper/Data.php
@@ -24,6 +24,21 @@ class Data extends AbstractHelper
*/
private $tab = 'magenizr_envbar';
+ /**
+ * @var \Magento\Framework\App\RequestInterface
+ */
+ protected $request;
+
+ /**
+ * @var \Magento\Framework\UrlInterface
+ */
+ protected $urlInterface;
+
+ /**
+ * @var \Magento\Framework\Serialize\SerializerInterface
+ */
+ protected $serializer;
+
/**
* Data constructor.
*
diff --git a/Observer/Adminhtml/AddCss.php b/Observer/Adminhtml/AddCss.php
index 9467234..8ac5edf 100644
--- a/Observer/Adminhtml/AddCss.php
+++ b/Observer/Adminhtml/AddCss.php
@@ -17,6 +17,16 @@ use Magento\Framework\View\Page\Config;
class AddCss implements ObserverInterface
{
+ /**
+ * @var \Magenizr\Envbar\Helper\Data
+ */
+ protected $dataHelper;
+
+ /**
+ * @var \Magento\Framework\View\Page\Config
+ */
+ protected $pageConfig;
+
/**
* AddCss constructor.
*
--
2.34.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment