Skip to content

Upgrading to 1.1.13

This release has been a product of continuous development, drawing extensively from the valuable technical feedback we've collected over the past few months. We've made significant strides in areas such as form handling, order placement, and data security. Additionally, this release paves the way for upcoming improvements, which will now be simpler to implement thanks to the groundwork laid down.

Please refer to the changelog for details.

Please check the upgrade process overview for Hyvä-Checkout first.
Then, to upgrade, run the command

composer update --with-dependencies hyva-themes/magento2-hyva-checkout:1.1.13

Backward incompatible changes

Payment Method Integrations with a PlaceOrderService extending from AbstractPlaceOrderService

Since this release the Hyva\Checkout\Model\Magewire\Payment\AbstractPlaceOrderService implements EvaluationInterface, and the method canRedirect was changed to return false by default.

This can cause Payment Method integrations to no longer redirect.

Payment integrations will need to be updated as follows to account for these changes.
If redirect to the success page is not the default behavior for the integration, the method evaluateCompletion() has to be overwritten, so it returns a redirect with the custom url.
For example:

public function evaluateCompletion(
    EvaluationResultFactory $resultFactory,
    ?int $orderId = null
): EvaluationResultInterface {
    $quote = $this->sessionCheckout->getQuote();
    $redirectUrl = $this->getRedirectUrl($quote, $orderId);

    return $resultFactory->createRedirect($redirectUrl)->withTimeout(0);
}

Also, the PlaceOrderService has to override the canRedirect method and return true:

public function canRedirect(): bool
{
    return true;
}

Depending on the payment integration both or only the second change may need to be implemented.

Hyva\Checkout\Magewire\Main

  • Method placeOrder() now can accept argument $data = [].

Hyva\Checkout\Magewire\Component\AbstractForm

  • Both boot() and mount() method have been typed with void as their return result.

Hyva\Checkout\Magewire\Checkout\GuestDetails

  • Method boot() have been typed with void as its return result.

Hyva\Checkout\Model\Magewire\Component\Evaluation\Success

  • Protected bool property $dispatch was removed.
  • Public const TYPE was removed.

Hyva_Checkout::checkout/price-summary/total-segments.phtml

  • A couple of breaking changes needed to be made in order to keep supporting the Hyva\Checkout\ViewModel\Checkout\PriceSummaryTotalSegments::getTotals returning which was introduced in issue #231.

Deprecations

Hyva\Checkout\Model\ConfigData\HyvaThemes\SystemConfigAddressForm

  • The useLumaShippingAddressEmailTooltip() method has been deprecated where it has been replaced by Hyva\Checkout\Model\ConfigData\HyvaThemes\SystemConfigGuestDetails::getEmailAddressTooltip()

Hyva\Checkout\Model\Form\EntityField\AbstractEntityField

  • The getFrontendInputAlias() was replaced by getLayoutAlias().

Hyva\Checkout\Model\Form\EntityField\EntityFieldRenderer

  • Deprecated the $alias method property for getRenderTypes() who's been taken over by the getLayoutAlias() method.

Hyva\Checkout\Model\Form\EntityFormElement\RendererInterface

  • The renderAs method has been deprecated where it has been replaced by Hyva\Checkout\Model\Form\EntityFormElement\Renderer\AbstractRenderer::renderWithTemplate()

Hyva\Checkout\Model\Form\EntityFormInterface

  • Forms no longer need to be implemented with the EntityFormInterface where a form now should be extended by the Hyva\Checkout\Model\Form\AbstractEntityForm abstract class.

Hyva\Checkout\Model\Form\EntityFormModifier\MagewireAuthenticationModifier

  • Class has been marked as deprecated since the new Guest Details feature extracting the email address field from the shipping- and billing forms into its own dedicated component.

Hyva\Checkout\Model\Form\EntityFormSaveServiceInterface

  • Interface has been replaced by the Hyva\Checkout\Model\Form\AbstractEntityFormSaveService abstract class.

Hyva\Checkout\Model\Magewire\Component\EvaluationResultInterface

  • Interface has been replaced by the Hyva\Checkout\Model\Magewire\Component\Evaluation\EvaluationResult abstract class.

Hyva_Checkout::page/js/api/v1/alpinejs/address-form-component.phtml

  • With the introduction of the Hyva\Checkout\Magewire\Component\AbstractForm, forms are now being rendered by the Hyva_Checkout::magewire/component/form.phtml template.

Changelogs

Changelogs are available from the CHANGELOG.md in the codebase, or here in the docs.