Magento 2.1 backward incompatible changes


Magento 2.1 introduces changes that may affect the correct functionality of already released external modules. The purpose of this document is to highlight the changes between Magento 2.0 and 2.1.

API Changes

Magento 2.1 introduces changes in several API classes. These changes are designed to extend overall API coverage and improve developer experience with new features.

Catalog Module API

The Catalog module introduces new service methods that enhance both options management and products to categories cross linking management.

Class: Magento\Catalog\Api\CategoryLinkManagementInterface
Action: Added the service method assignProductToCategories
Description: Assign product to given categories

Class: Magento\Catalog\Api\ProductCustomOptionRepositoryInterface
Action: Added the service method getProductOptions
Description: Returns product options

Action: Added service method - duplicate
Description: Duplicate product options

Class: Catalog\Api\ProductLinkRepositoryInterface
Action: Added service method - getList
Description: Get product links list

CMS Module

The CMS Module has been updated to allow you to manage meta titles for your CMS pages.

Class: Magento\Cms\Api\Data\PageInterface
Action: Added the getter method getMetaTitle
Description: Add meta title field to CMS pages

Action: Added the setter method setMetaTitle
Description: Set meta title field of CMS pages

GiftcardAccount Module (Magento Commerce Only)

A data interfaces has been changed in the GiftcardAccount module.

Class: Magento\GiftCard\Api\Data\GiftcardAmountInterface
Action: Added the getter method getAttributeId
Description: Remove GiftCard Account entity

Action: Added the setter method setAttributeId
Description: Remove GiftCard Account entity

Changes in UI

In release 2.1, Magento introduced a new way to build the Admin UI. Old forms have been rewritten using the new UI components. The new UI forms have better flexibility and can be customized using configuration files.

The following entities have new forms and design:

  • Product
  • Category

  • CMS Page
  • CMS Block

  • Sales Rule
  • Catalog Rules

Important information: Customizations that were performed with the old forms of the listed entities will be lost.

Database Schema changes

Staging (Magento Commerce Only)

The Staging modules introduce database schema changes for the following entities:

  • Products
  • Categories
  • CMS Pages and Blocks
  • Cart and Catalog Price Rules

These changes are applied only if Staging modules are installed. For extension modules (e.g. DownloadableProduct, ConfigurableProduct, Bundle etc.), relations between main entity tables were changed which may affect code that manages SQL queries directly.

Persistence management

In Magento 2.1 release, a new level of persistence management has been added, the EntityManager library component. It allows decoupling from Magento persistence infrastructure and provide more flexibility for future development. At the same time, the entity manager supports all “Magento 1-style” model events in a backward compatible manner.

Data interfaces persistence

In the 2.1 release, we introduce support for the persistence of data interfaces for the following entities:

  • Product
  • Category
  • CMS Page
  • CMS Block
  • Sales Rule
  • Catalog Rule

This change may affect extensions that rely on implicit data of “Magento 1-style” models.