Skip to content

Updating to Venta Theme 1.6.2.2 (Magento 2.4.9)

This release targets Magento 2.4.9 compatibility. It also realigns the storefront with Hyvä Default Theme 1.4.6 and confirms compatibility for the full set of Magebit-maintained extensions against the new Magento version. Unlike 1.6.0, this is a runtime/dependency upgrade with no build-stack migration. The steps are limited to Composer, the Smile ElasticSuite 2.11.19 upgrade, and two vendor patches required for PHP 8.4+ on the Mageplaza dependency chain.

Recommended reading before starting:

Prerequisites

The previously supported Magento versions remain supported. The steps below are only required when upgrading the project to Magento 2.4.9.

See Installation, Requirements for the full list of supported Magento and PHP versions.

What This Release Includes

Magento 2.4.9 compatibility, Magebit extensions

Confirmed compatible with Magento 2.4.9 in this release:

ExtensionNotes
Magebit_StyleGuide
Magebit_VentaBackInStock
Magebit_VentaSmileElasticSuiteFix for the price-range slider regression introduced by Smile ElasticSuite 1.2.7
Magebit_ImageResizer
Magebit_GdprExtension
Magebit_SeoExtension
Magebit_ProductFeed
Magebit_Tracking
Magebit_PerformanceOptimizations
Magebit_VentaMageplazaBlogRequires vendor patches, see §4
Magebit_ProductAttachments
Magebit_VentaShopByBrand
Magebit_SocialLogin1.0.2, fixes a regression introduced in Venta 1.6.2

Hyvä Default Theme 1.4.6

hyva-themes/magento2-default-theme and hyva-themes/magento2-theme-module are pinned to 1.4.6. Refer to the upstream 1.4.6 upgrade notes for theme-level changes. Venta Theme already incorporates the relevant overrides.

1. Update Composer Dependencies

Bump the Magento product edition and the Venta Theme stack in the project's composer.json:

json
{
  "require": {
    "magento/product-community-edition": "2.4.9",
    "magebitcom/magento2-venta-theme": "1.6.2.2",
    "magebitcom/magento2-venta-theme-module": "1.6.2.2",
    "magebitcom/magento2-venta-theme-smile-elasticsuite-module": "1.6.2.2",
    "hyva-themes/magento2-default-theme": "1.4.6",
    "hyva-themes/magento2-theme-module": "1.4.6"
  }
}

Then run:

bash
composer update \
  magento/product-community-edition \
  magebitcom/magento2-venta-theme \
  magebitcom/magento2-venta-theme-module \
  magebitcom/magento2-venta-theme-smile-elasticsuite-module \
  hyva-themes/magento2-default-theme \
  hyva-themes/magento2-theme-module \
  --with-all-dependencies

2. Upgrade Smile ElasticSuite to 2.11.19

For compatibility with Magento 2.4.9, this release requires smile/elasticsuite:2.11.19. Pin it in composer.json:

json
{
  "require": {
    "smile/elasticsuite": "2.11.19"
  }
}

Then run:

bash
composer update smile/elasticsuite --with-all-dependencies

WARNING

Do not upgrade to smile/elasticsuite 2.12.0. The Hyvä compatibility module hyva-themes/magento2-smile-elasticsuite (latest 1.2.7.1) constrains smile/elasticsuite to ~2.10.9|~2.11.0, so Composer cannot resolve 2.12.x. Stay on the 2.11.x line until Hyvä releases a bridge that allows ~2.12.

3. Run Magento Upgrade

bash
bin/magento maintenance:enable
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
bin/magento maintenance:disable

Rebuild theme assets in the Venta Theme child theme directory:

bash
cd app/design/frontend/Magebit/{ProjectTheme}/web/tailwind
npm run build-prod

4. Apply Mageplaza Vendor Patches (PHP 8.5)

Only required if the project uses Magebit_VentaMageplazaBlog. The two upstream Mageplaza packages still rely on the (boolean) cast, which is removed in PHP 8.5. Both patches replace it with the canonical (bool).

Patch files

Create a patches/ directory at the Magento root if it does not exist, then save the two files below into it.

Patch filePackageVersionTarget file
patches/mageplaza-core-bool-php85.patchmageplaza/module-core1.5.15Model/Feed.php
patches/mageplaza-blog-bool-php85.patchmageplaza/magento-2-blog-extension4.3.1Controller/Adminhtml/Category/CategoriesJson.php

patches/mageplaza-core-bool-php85.patch

diff
--- a/Model/Feed.php
+++ b/Model/Feed.php
@@ -50,7 +50,7 @@
      */
     public function checkUpdate()
     {
-        if (!(boolean) $this->_backendConfig->getValue('mageplaza/general/notice_enable')) {
+        if (!(bool) $this->_backendConfig->getValue('mageplaza/general/notice_enable')) {
             return $this;
         }

patches/mageplaza-blog-bool-php85.patch

diff
--- a/Controller/Adminhtml/Category/CategoriesJson.php
+++ b/Controller/Adminhtml/Category/CategoriesJson.php
@@ -83,7 +83,7 @@
     {
         $this->_objectManager->get(Session::class)->setIsTreeWasExpanded(
-            (boolean) $this->getRequest()->getParam('expand_all')
+            (bool) $this->getRequest()->getParam('expand_all')
         );

Wire the patches into composer.json

Add the following block under extra:

json
{
  "extra": {
    "composer-exit-on-patch-failure": true,
    "patches": {
      "mageplaza/module-core": {
        "PHP 8.5: replace deprecated (boolean) cast with (bool) in Model/Feed.php": "patches/mageplaza-core-bool-php85.patch"
      },
      "mageplaza/magento-2-blog-extension": {
        "PHP 8.5: replace deprecated (boolean) cast with (bool) in Controller/Adminhtml/Category/CategoriesJson.php": "patches/mageplaza-blog-bool-php85.patch"
      }
    }
  }
}

Apply

bash
composer install

Composer should report two successful patches in the install output.