diff --git a/CHANGELOG.md b/CHANGELOG.md index b6c924a2..6e2ebf23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [3.7.4] - 15 December 2023 +### Fixed +- Fix PHP 7.4 compat issues + ## [3.7.3] - 15 December 2023 ### Fixed - Livewire: Multiple root elements detected diff --git a/MageWire/Checkout.php b/MageWire/Checkout.php index 87710811..0e95b35f 100644 --- a/MageWire/Checkout.php +++ b/MageWire/Checkout.php @@ -14,13 +14,21 @@ class Checkout extends Component 'shipping_method_selected' => 'triggerShippingMethod', 'payment_method_selected' => 'triggerPaymentMethod', ]; + private CheckoutSession $checkoutSession; + private BeginCheckout $beginCheckout; + private AddShippingInfo $addShippingInfo; + private AddPaymentInfo $addPaymentInfo; public function __construct( - private readonly CheckoutSession $checkoutSession, - private readonly BeginCheckout $beginCheckout, - private readonly AddShippingInfo $addShippingInfo, - private readonly AddPaymentInfo $addPaymentInfo, + CheckoutSession $checkoutSession, + BeginCheckout $beginCheckout, + AddShippingInfo $addShippingInfo, + AddPaymentInfo $addPaymentInfo ) { + $this->checkoutSession = $checkoutSession; + $this->beginCheckout = $beginCheckout; + $this->addShippingInfo = $addShippingInfo; + $this->addPaymentInfo = $addPaymentInfo; } public function triggerBeginCheckout() diff --git a/Util/GetCategoryFromProduct.php b/Util/GetCategoryFromProduct.php index de6ff979..e58377b4 100644 --- a/Util/GetCategoryFromProduct.php +++ b/Util/GetCategoryFromProduct.php @@ -57,11 +57,11 @@ public function get(Product $product): CategoryInterface } /** - * @param Product $product + * @param ProductInterface $product * @return CategoryInterface[] * @throws NoSuchEntityException */ - public function getAll(Product|ProductInterface $product): array + public function getAll(ProductInterface $product): array { $categoryIds = $product->getCategoryIds(); diff --git a/composer.json b/composer.json index e5d7c40c..5f9058a0 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "yireo/magento2-googletagmanager2", - "version": "3.7.3", + "version": "3.7.4", "license": "OSL-3.0", "type": "magento2-module", "homepage": "https://www.yireo.com/software/magento-extensions/googletagmanager2",