What's New in Magento Open Source 2.4.8

What's New in Magento Open Source 2.4.8

Explore the significant updates in Magento Open Source 2.4.8, including PHP version changes, database updates, search engine migration, and performance optimizations.

Each new release of Magento usually brings with it a wave of new features and improvements, and 2.4.8 is no exception. In this deep-dive, we'll get into the most significant updates that dropped in this version and highlight the key areas that developers will want to focus on.

What is Magento?

If you are new to Magento, you may be wondering what it's all about. Magento is an open-source platform that was built to provide the ability to create completely customized eCommerce storefronts. It's a web app, similar to a regular website, but contains extra functionality that allows visitors to add items to their shopping cart and place an order.

You can think of Magento as similar to Amazon, but tailored to the needs of a specific merchant. Because it is extremely flexible and extensible, Magento is a fantastic choice for merchants looking to build their ideal storefront.

To build a custom store, you will typically work with Magento developers who have extensive experience with the platform. They understand the ins and outs of how Magento works, and can help you create a store that fits your specific business needs.

PHP 8.3 and 8.4 Compatibility

A huge update that stands out in Magento 2.4.8 is PHP 8.3 and PHP 8.4 compatibility. Adobe has completely dropped support for PHP 8.1, signaling they clearly intend to only support more recent versions of PHP moving forward.

PHP 8.3 Features

While PHP 8.2 is still supported (thought this isn't widely documented), it's meant to be used as a bridge for upgrading to PHP 8.3, rather than the recommended version. PHP 8.3 is now the standard, and the codebase will continue to be optimized to take advantage of the language's new features.

This shift brings both opportunities and challenges. Developers will need to familiarize themselves with PHP 8.3's new offerings, such as typed class constants and the fresh #[Override] attribute.

PHP 8.3 Override Attribute

Developers will be extremely excited to know that Magento 2.4.8 also support all of the new PHP 8.4 features, including concepts like property hooks and asymmetric visibility. Support for the newest version of PHP suggests that Adobe is doing their best to keep Magento at the forefront of eCommerce development, but it also means developers will need to continue to stay ahead of the curve and continue to upgrade and refine their PHP skills.

PHP 8.4 Property Hooks

MySQL and MariaDB Database Engine Updates

The database landscape for Magento 2.4.8 has also seen significant updates. Support has been extended to MySQL 8.4 and MariaDB 11.4, a move that's crucial for maintaining long-term stability and security. These versions come with extended support timelines, with MySQL 8.4 supported until April 2032 and MariaDB 11.4 through May 2029.

MySQL 8.4 Lifecycle

A notable technical change is the shift from utf8mb3 to utf8mb4 collation. This might seem like a minor update, but it significantly expands Unicode support, which allows for a wider range of characters such as emoji and complex more characters. This change benefits international stores which may need this extra level of support with expanded character sets.

Shift from Elasticsearch to OpenSearch Search Engine

Perhaps the most impactful change in Magento 2.4.8 is the complete removal of Elasticsearch support in favor of OpenSearch. This isn't just a simple swap of search engines; it represents a significant shift in the Magento ecosystem, which continues to be driven by licensing changes and the growing adoption of OpenSearch in cloud environments.

OpenSearch Logo

This change necessitates a mandatory search engine migration for thousands of Magento stores. The implications of this change also extend beyond just the search functionality. It affects how Magento interacts with its search layer, which impacts performance, relevance scoring, and even many custom extensions that have been built around Elasticsearch's specific features.

GraphQL Enhancements for Headless Commerce

Magento 2.4.8's GraphQL layer has received significant attention, reflecting its growing importance when it comes to building headless commerce solutions. The introduction of custom scalar types in the framework helps developers building custom frontends or Progressive Web Applications (PWAs). This enhancement allows for more nuanced handling of complex data types, such as HTML-rich product descriptions or specialized URL formats, without the need for implement custom parsing logic.

GraphQL Custom Scalar Types

The ability to sort products by multiple fields through GraphQL queries is another powerful addition. This feature provides developers with a higher level of control over the presentation of products, without resorting to custom backend logic. It's a seemingly small change, but can have an impact on user experience and performance, especially for stores with large, diverse product catalogs.

Cache management for GraphQL resolvers has also been improved. The system now automatically invalidates caches when customer data is updated through imports. This ensures that the GraphQL layer always serves up-to-date information, and prevents scenarios where users may see stale data after backend updates take place.

Not sure what's going on in this section? Find out how GraphQL works.

Performance Improvements and Optimizations

Performance improvements in Magento 2.4.8 touch various aspects of the system. One of the most notable changes is the optimization of queries for retrieving products, cross-sells, and up-sells. This update is particularly beneficial for stores with high product volumes or those that have complex product configurations.

The shift in the default indexer mode from "Update on Save" to "Update by Schedule" is a subtle, but fairly impactful change.

Admin Indexes Configuration

This new approach queues indexing operations to run in the background rather than applying them immediately after each change, which leads to more consistent system performance, especially during periods of large data imports or catalog updates.

Security XSS and RCE Fixes

Security remains a top priority in Magento 2.4.8, with several key improvements. The platform addresses several potential cross-site scripting (XSS) vulnerabilities, and closes a few other loopholes that could have lead to remote code execution (RCE) attacks. These updates are crucial for protecting sensitive customer data as well as maintaining PCI DSS compliance.

What is XSS

A significant change in security management is that the encryption key rotation process has been moved from being handled in the Admin UI to the CLI (command-line interface). This provides a more secure and reliable way to manage encryption keys, especially within deployment pipelines and multiserver environments.

Encryption Key Change

The upgrade of RequireJS to version 2.3.7 addresses several vulnerabilities related to arbitrary code execution and Denial of Service (DoS) attacks. Similarly, the update to Prototype.js mitigates risks associated with regular-expression-based Denial of Service (ReDoS) attacks.

B2B and Commerce Features

For B2B-focused developers, Magento 2.4.8 brings with it some welcome improvements. The fixes for shared catalog visibility and the addition of negotiable quotes in the GraphQL layer make Magento's B2B capabilities unmatched. This allows for a more seamless integration of complex B2B workflows within custom-built applications.

Manage Tier Prices

The REST API has been updated to better handle order comment status changes, ensuring consistency with the current order state. This improvement is crucial for developers working on order management integrations and provides more predictable and expected API behavior.

Payment gateway integrations, particularly with Braintree, have also seen a few notable enhancements. The addition of shipping options being displayed directly in the PayPal modal and improved package tracking support both streamline the checkout process and post-purchase experience. These changes provide a more integrated and user-friendly checkout process flow.

Braintree Package Tracking

Recap

Magento 2.4.8 represents a solid evolution of Magento. The changes in PHP version support, database compatibility, search engine technology, and various other areas will get the attention of most Magento developers and administrators.

While these updates bring exciting new capabilities and performance improvements, they also require careful planning and potentially significant work to implement. Developers will need to review and update their custom backend code, test thoroughly with the new PHP versions and database engines, and potentially rethink their approach to search functionality.

Magento continues to be a leading choice for eCommerce platforms, and 2.4.8 is progress in that direction. The release of 2.4.8 underscores the platform's commitment to staying up to date with current trends, and remains a solid choice for businesses looking to expand their online presence.