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
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
:
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()
andmount()
method have been typed withvoid
as their return result.
Hyva\Checkout\Magewire\Checkout\GuestDetails
- Method
boot()
have been typed withvoid
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 byHyva\Checkout\Model\ConfigData\HyvaThemes\SystemConfigGuestDetails::getEmailAddressTooltip()
Hyva\Checkout\Model\Form\EntityField\AbstractEntityField
- The
getFrontendInputAlias()
was replaced bygetLayoutAlias()
.
Hyva\Checkout\Model\Form\EntityField\EntityFieldRenderer
- Deprecated the
$alias
method property forgetRenderTypes()
who's been taken over by thegetLayoutAlias()
method.
Hyva\Checkout\Model\Form\EntityFormElement\RendererInterface
- The
renderAs
method has been deprecated where it has been replaced byHyva\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 theHyva\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 theHyva_Checkout::magewire/component/form.phtml
template.
Changelogs
Changelogs are available from the CHANGELOG.md
in the codebase, or here in the docs.