Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 6195a66

Browse files
Merge pull request #7295 from magento/MC-32476-beta-BICs
Backward incompatible changes for 2.4.0 beta
2 parents 0bb9247 + e77e2e0 commit 6195a66

File tree

2 files changed

+192
-6
lines changed

2 files changed

+192
-6
lines changed

src/guides/v2.4/release-notes/backward-incompatible-changes/index.md

Lines changed: 174 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,177 @@ group: release-notes
33
title: Magento 2.4 backward incompatible changes
44
---
55

6-
Magento 2.4 introduces several major changes that may affect the correct functionality of already released external modules.
7-
The purpose of this document is to provide additional information about the changes introduced by the 2.4 releases.
6+
This page highlights backward incompatible changes between releases that have a major impact and require detailed explanation and special instructions to ensure third-party modules continue working with Magento. High-level reference information for all backward incompatible changes in each release are documented in the [Backward incompatible changes reference]({{page.baseurl}}/release-notes/backward-incompatible-changes/reference.html) topic.
7+
8+
## 2.3.0 - 2.4-develop
9+
10+
### UrlRewrite module
11+
12+
The Admin grid in the UrlRewrite module was moved to UI components and all unused blocks were removed. Added mass delete and inline edit actions.
13+
14+
```terminal
15+
adminhtml.block.url_rewrite.grid.container
16+
adminhtml.block.url_rewrite.grid
17+
adminhtml.url_rewrite.grid.columnSet
18+
adminhtml.url_rewrite.grid.columnSet.url_rewrite_id
19+
adminhtml.url_rewrite.grid.columnSet.store_id
20+
adminhtml.url_rewrite.grid.columnSet.request_path
21+
adminhtml.url_rewrite.grid.columnSet.target_path
22+
adminhtml.url_rewrite.grid.columnSet.redirect_type
23+
adminhtml.url_rewrite.grid.columnSet.actions
24+
```
25+
26+
### Elasticsearch
27+
28+
You must install [Elasticsearch]({{ page.baseurl }}/install-gde/prereq/elasticsearch.html) before upgrading to Magento 2.4.0. The following Elasticsearch versions are supported:
29+
30+
- Elasticsearch 7.x
31+
- Elasticsearch 6.x (6.8 or higher is recommended)
32+
33+
{:.bs-callout-warning}
34+
Magento no longer provides support for Elasticsearch [2.x and 5.x](https://www.elastic.co/support/eol) as they are End of Life. If you are using ES2, follow the instructions in [Change Elasticsearch Module]({{ page.baseurl }}/config-guide/elasticsearch/es-downgrade.html) before upgrading.
35+
36+
The changes with removing values from the `system.xml` file require eliminating ES2 support from the Admin UI. Other API classes were removed to clean up the code when we deprecated ES2 and ES5 in Magento 2.3.5.
37+
38+
#### Level Target/Location Code/Reason
39+
40+
```terminal
41+
MAJOR Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldType
42+
/app/code/Magento/Elasticsearch/Elasticsearch5/Model/Adapter/FieldType.php:20 V005 Class was removed.
43+
MAJOR Magento\Elasticsearch\SearchAdapter\DocumentFactory::__construct
44+
/app/code/Magento/Elasticsearch/SearchAdapter/DocumentFactory.php:30 M113 [public] Method parameter typing changed.
45+
MAJOR Magento\Elasticsearch\SearchAdapter\DocumentFactory::$objectManager
46+
/app/code/Magento/Elasticsearch/SearchAdapter/DocumentFactory.php:30 V009 [protected] Property has been removed.
47+
MAJOR Magento\Elasticsearch\Model\Client\ElasticsearchFactory
48+
Magento_Elasticsearch:0
49+
MAJOR catalog/search/elasticsearch_server_hostname
50+
Magento_Elasticsearch:0 M303 A field-node was removed
51+
MAJOR catalog/search/elasticsearch_server_port
52+
Magento_Elasticsearch:0 M303 A field-node was removed
53+
MAJOR catalog/search/elasticsearch_index_prefix
54+
Magento_Elasticsearch:0 M303 A field-node was removed
55+
MAJOR catalog/search/elasticsearch_enable_auth
56+
Magento_Elasticsearch:0 M303 A field-node was removed
57+
MAJOR catalog/search/elasticsearch_username
58+
Magento_Elasticsearch:0 M303 A field-node was removed
59+
MAJOR catalog/search/elasticsearch_password
60+
Magento_Elasticsearch:0 M303 A field-node was removed
61+
MAJOR catalog/search/elasticsearch_server_timeout
62+
Magento_Elasticsearch:0 M303 A field-node was removed
63+
MAJOR catalog/search/elasticsearch_test_connect_wizard
64+
Magento_Elasticsearch:0 M303 A field-node was removed
65+
MAJOR catalog/search/elasticsearch_minimum_should_match
66+
Magento_Elasticsearch:0 M303 A field-node was removed
67+
```
68+
69+
### Inventory asynchronous reindex
70+
71+
A new Stock/Source reindex strategy configuration setting option was added to the Admin to prevent index table collisions. The setting has the following options:
72+
73+
- Synchronous
74+
- Asynchronous
75+
76+
Previoously, it was possible to have a "burst" of activity that triggered contention of the index process. Even batching and deferring individual updates that were triggering the indexer, it was still highly likely that an index table collision would occur based on "other" activity.
77+
78+
For example, if the indexer was running based on schedule, and replenishment happens manually through the Admin or interaction with an order, indexing would be triggered. Previously, that would result in two processes attempting to index; one of those will "lose", leading to a deadlocked/stale index.
79+
80+
```terminal
81+
MAJOR Magento\InventoryIndexer\Indexer\Stock\StockIndexer::__construct
82+
/InventoryIndexer/Indexer/Stock/StockIndexer.php:28 M113 [public] Method parameter typing changed.
83+
MAJOR Magento\InventoryIndexer\Indexer\SourceItem\SourceItemIndexer::__construct
84+
/InventoryIndexer/Indexer/SourceItem/SourceItemIndexer.php:27 M113 [public] Method parameter typing changed.
85+
```
86+
87+
### JSON field support
88+
89+
MySQL 5.7 supports the native JSON data type: [https://dev.mysql.com/doc/refman/5.7/en/json.html](https://dev.mysql.com/doc/refman/5.7/en/json.html). Magento 2.4.0 now supports using JSON fields with a declarative schema.
90+
91+
### Laminas
92+
93+
Migrating ZF2 components to Laminas introduced BICs in the following files:
94+
95+
```terminal
96+
Magento\Backend\App\Area\FrontNameResolver::_construct - _constructor argument type was changed
97+
Magento\Framework\App\Response\HttpInterface::getHeader - declared return type was changed
98+
```
99+
100+
Both files are API class/interface. These changes will be solved dynamically during runtime if you follow the recommended guidelines.
101+
102+
### MediaContent and MediaContentApi modules
103+
104+
The 'MediaContent' and 'MediaContentApi' modules were introduced to provide the ability to manage relationships between content and media assets used in that content.
105+
106+
Additionally, observers have been added to the CMS and Catalog modules to save the relationship of corresponding entities to 'MediaContent' storage.
107+
108+
### Method parameter typing changed
109+
110+
Method parameter typing was changed to leverage [PHP 7+ Throwables](https://www.php.net/manual/en/class.throwable.php) and enable catching ALL possible errors that might expose confidential information, such as passwords.
111+
112+
#### Level Target/Location Code/Reason
113+
114+
```terminal
115+
Magento\Framework\App\Bootstrap::terminate
116+
/lib/internal/Magento/Framework/App/Bootstrap.php:426 M114 [protected] Method parameter typing changed.
117+
```
118+
119+
### New bulk interfaces for inventory scalability check
120+
121+
In order to support bulk check for products scalability, we introduced two new interfaces:
122+
123+
```terminal
124+
InventorySalesApi/Api/AreProductsSalableInterface
125+
InventorySalesApi/Api/AreProductsSalableForRequestedQtyInterface
126+
```
127+
128+
These changes allow third-party developers to optimize performance by providing an implementation for bulk services.
129+
130+
- Introduced a Bulk version of `IsProductSalableForRequestedQtyInterface` API
131+
- Introduced a Bulk version of `IsProductSalableInterface` when working with a list of items
132+
133+
### Size field added to media_gallery_asset table
134+
135+
This is a dependency for the Adobe Stock integration.
136+
137+
A size field was added to the `media_gallery_asset` table to enable storing and using the media asset size. The Media Gallery Asset entity model and interface were updated accordingly.
138+
139+
The `Magento\MediaGalleryApi\Api\Data\AssetInterface` that was updated with a new public method in the scope of the changes is not marked as @api so it is not currently part of Magento API.
140+
141+
The possible impact is minimal: the table was introduced in 2.3.4 (just several month ago) and it was not used by any functionality in Magento 2 (only Adobe Stock Integration extension).
142+
143+
### SVC failure due to adding strict types
144+
145+
This change fixes a bug where `getDefaultLimitPerPageValue` returns a value that is not available.
146+
147+
As a Store Administrator, you are able to provide the 'Products per Page on Grid Allowed' values and 'Products per Page on Grid Default' value. There is no verification, so you can accidentally set the default value to be one of the unavailable options.
148+
149+
The only stores that might be affected are the ones who changed the configuration value for 'Default items per page', without customizing possible options. Some system integrators customize either the default value or allowed values.
150+
151+
As a result, there is inconsistency between default and allowed values. So far this worked by coincidence, but after the change, that would be explicit.
152+
153+
Per technical guidelines, all new PHP files MUST have strict type mode enabled by starting with `declare(strict_types=1);`. All updated PHP files SHOULD have strict type mode enabled. PHP interfaces MAY have this declaration.
154+
155+
Strict typing was added to the `app/code/Magento/Catalog/Helper/Product/ProductList.php` file.
156+
157+
It caused SVC failures.
158+
159+
Return type now array (the same as before in DocBlock):
160+
161+
```terminal
162+
MAJORMagento\Catalog\Helper\Product\ProductList::getAvailableLimit /app/code/Magento/Catalog/Helper/Product/ProductList.php:122M120 [public] Method return typing
163+
```
164+
165+
Return type now array (the same as before in DocBlock):
166+
167+
```terminal
168+
changed.MAJORMagento\Catalog\Helper\Product\ProductList::getAvailableLimit /app/code/Magento/Catalog/Helper/Product/ProductList.php:122V060 [public] Method parameter name
169+
```
170+
171+
Now returns int for `DefaultLimitPerPageValue`:
172+
173+
```terminal
174+
changed.MAJORMagento\Catalog\Helper\Product\ProductList::getDefaultLimitPerPageValue /app/code/Magento/Catalog/Helper/Product/ProductList.php:147M120 [public] Method return typing changed.
175+
```
176+
177+
### UUID validator
178+
179+
This code adds the Ramsey library as a UUID validator and creates wrappers for it. This feature is needed for the async-import project. They pass UUID to get status of the async-import, for that they need to validate UUID.

src/guides/v2.4/release-notes/backward-incompatible-changes/reference.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,25 @@ group: release-notes
33
title: Backward incompatible changes reference
44
---
55

6-
This reference contains the changes that were generated automatically by comparing the adjacent patch releases and cannot be edited on this page.
7-
It covers only PHP code at the moment using the following categorization:
6+
Use this page to review high-level reference information for all backward incompatible changes in each release. Backward incompatible changes that have a major impact and require detailed explanation and special instructions are documented in the [Backward incompatible changes highlights]({{page.baseurl}}/release-notes/backward-incompatible-changes/index.html) topic.
7+
8+
We use a custom tool that extends a PHP semantic version checker to auto-generate this content. The tool compares the code base from a previous release with the code base from the latest release. Backward incompatible changes for each release are aggregated into the following tables (if applicable):
89

910
- Class changes
10-
- Interface changes
1111
- Class API membership changes
12+
- Database changes
13+
- Dependency injection (DI) changes
14+
- Interface changes
15+
- Interface API membership changes
16+
- Layout changes
17+
- System changes
18+
- XSD changes
19+
20+
{:.bs-callout-info}
21+
Patch releases are primarily focused on delivering security and quality enhancements on a regular basis to help you keep your sites performing at their peak. On an exceptional basis, breaking changes or additional patches or hotfixes may be released to address security or compliance issues and high-impact quality issues. On the module level, these are mostly PATCH-level changes; sometimes MINOR-level changes. See [Release policy]({{site.baseurl}}/release/policy/).
22+
23+
## 2.3.0 - 2.4.0-develop
24+
25+
{% include backward-incompatible-changes/open-source/2.3.0-2.4-develop.html %}
1226

13-
If you want to provide additional information about any change that is listed here or any other changes that are not listed on this page, add your updates to the [Highlights](./index.html).
27+
{% include backward-incompatible-changes/commerce/2.3.0-2.4-develop.html %}

0 commit comments

Comments
 (0)