Table of Contents & Menu
Navigation

Upgrading to 1.2.0

Hyvä 1.2.0 upgrades the default theme's core libraries, Alpine.js and Tailwind CSS, from version 2 to 3. This requires changes to existing themes.

A Hyvä theme can only use Alpine.js v2 or v3, not both simultaneously.

If your store uses multiple themes, you can migrate them individually.

The hyva-themes/magento2-theme-module (v1.2.0) works with both Alpine.js v2 and v3. Therefore, it's safe to update the Hyva_Theme module to the latest version, even if you're not immediately updating your theme to 1.2.0.

Hyvä 1.2.x requires GraphQL Cart >= 1.0.4

If you use the hyva-themes/magento2-graphql-cart module, upgrade it to 1.0.4 first to satisfy composer dependencies:

composer require hyva-themes/magento2-graphql-cart:~1.0.4
Although the previous release was compatible with Alpine and Tailwind v3, composer constraints prevented its installation with theme-module 1.2.0.

Backward incompatible changes

In addition to the major version upgrades for Tailwind CSS and Alpine.js, a typo in the PHP cart coupon form HTML ID attribute was corrected from id="discound-form-toggle" to id="discount-form-toggle".

Migration scripts

Hyvä provides migration scripts to assist in upgrading existing themes from v2 to v3. While these scripts automate most of the process, thorough testing and additional manual adjustments to your theme will be necessary.

Hyvä Themes upgrade helpers

The upgrade script can be installed with composer via:

Install in a module, theme or project

composer require --dev hyva-themes/upgrade-helper-tools:dev-main

Install globally

composer global require --dev hyva-themes/upgrade-helper-tools:dev-main

The README.md file included with the package provides usage instructions for this upgrade helper script.

The script bin/hyva-1.2.0-tailwind-and-alpine.js migrates both Alpine and Tailwind to v3. Alternatively, you can upgrade them individually or incrementally.

For individual upgrades, use src/alpine-v2-to-v3/v2-to-v3.js or src/tailwind-v2-to-v3/v2-to-v3.js.

Refer to the readme files accompanying the scripts for detailed information.

Migration Details

For detailed migration instructions for Alpine and Tailwind from v2 to v3, refer to their official upgrade guides:

Changelogs

Changelogs are available in the `CHANGELOG.md` file within the codebase, or via these links:

Tooling

Refer to the Hyvä Theme upgrade documentation for additional upgrade information.