Skip to content

Commit

Permalink
Fix PHP 7.4 compat issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jissereitsma committed Dec 15, 2023
1 parent 77c811a commit 964129a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 12 additions & 4 deletions MageWire/Checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions Util/GetCategoryFromProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 964129a

Please sign in to comment.