Magento 2.0 Backward Incompatible Changes
This topic discusses the most important backward incompatible changes made after Magento 2.0.0 release in scope of 2.0 version.
Be aware that no @api code has been modified.
To see all backward incompatible changes follow:
For more information about backward compatibility, see Magento’s backward compatibility policy.
Framework changes
- A
convertConfigTimeToUtc()
method is added to thelib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface
interface. To implement this interface, please implement the method. - A
convertConfigTimeToUtc
method is added to thelib/internal/Magento/Framework/Stdlib/DateTime/Timezone
.
Magento_CatalogRule module changes
DB schema changes
- From the
catalogrule
table the following rows were deleted:sub_is_enable
,sub_simple_action
,sub_discount_amount
. - From the
catalogrule_product
table the following rows were deleted:sub_simple_action
,sub_discount_amount
.
UI changes
- The Subproduct discounts dropdown on a catalog price rule was deleted, including Apply and Discount Amount subfields.
Setup version 2.0.0 | Setup version 2.0.1 |
---|---|
Flow changes
- The functionality of adding a price rule to the subproduct was deleted.
Magento_Catalog module changes
Code changes
- General changes
- Reset button has been removed.
- POST data structure changed
- The parent category ID
parent_id
is now posted in thegeneral
field. - The category data from the
general
array is split to the specific arrays by a field set name.
- The parent category ID
setup_version version 2.0.3 |
setup_version version 2.0.4 |
---|---|
You can find a setup_version
parameter in the <your_Magento_module_dir>/etc/module.xml
file.
- The Google Optimizer POST data moved to a specific array.
On/Off
fields- The input type has been changed from
select
toswitcher
. - A web page sends POST message with attribute
value = "true"
if the field is checked orvalue = "false"
if it is not. - A server converts
value
attribute to the PHPtrue/false
boolean type value.
- The input type has been changed from
setup_version version 2.0.3 |
setup_version version 2.0.4 |
---|---|
Select option value (int, string) | String:{'true'|'false'} |
- Check boxes and radio buttons work as
on/off
fields. - Category products grid
- Rendered by a UI component as a standalone block
- Initialized using the
magento-init
event
- To join EAV attributes use
linkField
.
Magento\Framework\Model\Entity\MetadataPool::getMetadata(Magento\Catalog\Api\Data\CategoryInterface) -> getLinkField()
- To set a relation with another entities such as
category_product_entity
useidentifierField
.
Magento\Framework\Model\Entity\MetadataPool::getMetadata(Magento\Catalog\Api\Data\CategoryInterface) -> getIdentifierField()
Form initialization changes
- A form is built with UI components (more info about a form component).
- The form is extended using a form configuration file
<magento2>/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml
(see Overview of UI components). - A data provider
\Magento\Catalog\Model\Category\DataProvider
is used to set data and fields metadata for the form. - Default form data is now a part of metadata that is fetched from the
\Magento\Catalog\Model\Category\DataProvider
.
Flow changes
When Products -> Categories menu item in the Magento Admin is chosen, the first root category is selected for editing by default now. You can create a new category or a root category manually only. Use the corresponding button Add Root Category or Add Subcategory.