Skip to content

Instantly share code, notes, and snippets.

@clivewalkden
Created August 18, 2023 09:30
Show Gist options
  • Save clivewalkden/d4308aa6953cd2981207eb940dc00f12 to your computer and use it in GitHub Desktop.
Save clivewalkden/d4308aa6953cd2981207eb940dc00f12 to your computer and use it in GitHub Desktop.
CustomWeb Opayo Magento 2 PHP 8.2 Patch

Patch notes

Required to be added for PHP 8.2 sites. Without this patch the site errors at checkout steps.

Index: app/code/Customweb/SagePayCw/Model/Logging/Listener.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/code/Customweb/SagePayCw/Model/Logging/Listener.php b/app/code/Customweb/SagePayCw/Model/Logging/Listener.php
--- a/app/code/Customweb/SagePayCw/Model/Logging/Listener.php
+++ b/app/code/Customweb/SagePayCw/Model/Logging/Listener.php (date 1692348462000)
@@ -37,8 +37,9 @@
* @var string
*/
protected $fileName = '/var/log/sagepaycw.log';
+ private Logger $_logger;
- /**
+ /**
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Framework\Filesystem\Driver\File $filesystem
*/
diff --git a/app/code/Customweb/SagePayCw/Model/Configuration.php b/app/code/Customweb/SagePayCw/Model/Configuration.php
--- a/app/code/Customweb/SagePayCw/Model/Configuration.php
+++ b/app/code/Customweb/SagePayCw/Model/Configuration.php (date 1692349860635)
@@ -73,8 +73,9 @@
private $_reservedIds = [
'instance'
];
+ private \Magento\Framework\Module\Dir\Reader $_moduleReader;
- public function __construct(
+ public function __construct(
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Framework\Module\Dir\Reader $moduleReader,
@@ -239,4 +240,4 @@
]);
}
-}
\ No newline at end of file
+}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment