From ea3c8d84ac79a0c46b7eb2e581e63b5e794e5928 Mon Sep 17 00:00:00 2001 From: Erik Hanson Date: Mon, 8 Jun 2026 14:27:42 -0500 Subject: [PATCH 1/2] PHP 8.4 Nullable Deprecation Notice * Handles a deprecated nullable warning being thrown in PHP 8.4 --- Model/PaymentMethod/Layaways.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Model/PaymentMethod/Layaways.php b/Model/PaymentMethod/Layaways.php index 4891ba1..745906c 100644 --- a/Model/PaymentMethod/Layaways.php +++ b/Model/PaymentMethod/Layaways.php @@ -67,10 +67,10 @@ public function __construct( \Magento\Payment\Model\Method\Logger $logger, OpenPosConfiguration $openPosConfiguration, TillSessionManagement $tillSessionManagement, - \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, - \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, + ?\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, + ?\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [], - DirectoryHelper $directory = null + ?DirectoryHelper $directory = null ) { parent::__construct( $context, @@ -93,7 +93,7 @@ public function __construct( * @param \Magento\Quote\Api\Data\CartInterface|null $quote * @return bool */ - public function isAvailable(\Magento\Quote\Api\Data\CartInterface $quote = null) + public function isAvailable(?\Magento\Quote\Api\Data\CartInterface $quote = null) { // Check if POS module is enabled if(!$this->openPosConfiguration->isEnabled()) { From 0f1492d89b1ab79055178681677901b62c4bbeb4 Mon Sep 17 00:00:00 2001 From: Erik Hanson Date: Tue, 9 Jun 2026 08:28:42 -0500 Subject: [PATCH 2/2] Additional PHP 8.4 Nullable * Additional nullable deprecation notice --- Model/TillSessionManagement.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Model/TillSessionManagement.php b/Model/TillSessionManagement.php index 7b88f51..6da38dc 100644 --- a/Model/TillSessionManagement.php +++ b/Model/TillSessionManagement.php @@ -169,7 +169,7 @@ public function getTillSession(): ?TillSessionInterface * @param TillSessionInterface|null $tillSession * @return bool */ - public function isTillSessionActive(TillSessionInterface $tillSession = null): bool + public function isTillSessionActive(?TillSessionInterface $tillSession = null): bool { if($this->openPosConfiguration->isEnabled() !== true || $this->currentlyOnPosStore() == false) { $this->destroySession(); @@ -296,7 +296,7 @@ public function startTillSession(User $adminUser): TillSessionInterface * @param TillSessionInterface|null $tillSession * @return User|null */ - public function getAdminUserFromTillSession(TillSessionInterface $tillSession = null): ?User + public function getAdminUserFromTillSession(?TillSessionInterface $tillSession = null): ?User { if(!$tillSession) { $tillSession = $this->getTillSession();