Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 57d7288

Browse files
author
James Calcaben
committed
Add additional BiC content
1 parent e03c3a8 commit 57d7288

File tree

1 file changed

+161
-5
lines changed

1 file changed

+161
-5
lines changed

guides/v2.2/release-notes/backward-incompatible-changes.md

Lines changed: 161 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ Update your extension to use `\Magento\Framework\Serialize\Serializer\Json` for
191191

192192
**Case 6:**
193193
Your extension uses a backend model that extends `\Magento\Config\Model\Config\Backend\Serialized` to save/load data to/from the database.
194+
194195
**Solution:**
195196
Write an [upgrade script]({{page.baseurl}}ext-best-practices/tutorials/serialized-to-json-data-upgrade.html) to update data stored by the extension in the `core_config_data` table from serialized to JSON format.
196197

@@ -199,8 +200,163 @@ Write an [upgrade script]({{page.baseurl}}ext-best-practices/tutorials/serialize
199200
* [Serialize to JSON data upgrade]({{page.baseurl}}ext-best-practices/tutorials/serialized-to-json-data-upgrade.html)
200201
* [Serialize Library]({{page.baseurl}}extension-dev-guide/framework/serializer.html)
201202

202-
### Staging (EE Only)
203-
204-
## Persistence management
205-
206-
### Data interfaces persistence
203+
## Database field changes
204+
205+
This is a list of tables and fields where the data format changed from serialized to JSON format.
206+
207+
{% collapsible Show table %}
208+
209+
| Resource Model | Table | Field |
210+
| --- | --- | --- |
211+
| \Magento\Quote\Model\ResourceModel\Quote\Payment | quote_payment | additional_information |
212+
| \Magento\Reward\Model\ResourceModel\Reward\History | magento_reward_history | additional_data |
213+
| \Magento\Sales\Model\ResourceModel\Order\Item | sales_order_item | product_options |
214+
| \Magento\Sales\Model\ResourceModel\Order\Payment | sales_order_payment | additional_information |
215+
| \Magento\Sales\Model\ResourceModel\Order\Shipment | sales_shipment | packages |
216+
| \Magento\Sales\Model\ResourceModel\Order\Payment\Transaction | sales_payment_transaction | additional_information |
217+
| \Magento\Quote\Model\Quote\Item\Option | quote_item_option | value |
218+
| \Magento\GiftRegistry\Model\Item\Option | magento_giftregistry_item_option | value |
219+
| \Magento\Wishlist\Model\Item | wishlist_item_option | value |
220+
| \Magento\Sales\Model\ResourceModel\Order | sales_order | gift_cards |
221+
| \Magento\Quote\Model\ResourceModel\Quote | quote | gift_cards |
222+
| \Magento\Quote\Model\ResourceModel\Quote\Address | quote_address | applied_taxes, gift_cards |
223+
| \Magento\Quote\Model\Quote\Payment | quote_payment | additional_data |
224+
| \Magento\Customer\Model\Attribute | customer_eav_attribute | validate_rules |
225+
| \Magento\Rma\Model\Item\Attribute | magento_rma_item_eav_attribute | validate_rules |
226+
| \Magento\UrlRewrite\Model\UrlRewrite | url_rewrite | metadata |
227+
| \Magento\Framework\Flag\FlagResource | flag | flag_data |
228+
| \Magento\Config\Model\ResourceModel\Config | core_config_data | value |
229+
| \Magento\Widget\Model\ResourceModel\Widget\Instance | widget_instance | widget_parameters |
230+
| \Magento\Reminder\Model\Rule | magento_reminder_rule | conditions_serialized |
231+
| \Magento\TargetRule\Model\Rule | magento_targetrule | actions_serialized, conditions_serialized, action_select_bind |
232+
| \Magento\SalesRule\Model\Rule | salesrule | conditions_serialized, actions_serialized |
233+
| \Magento\CatalogRule\Model\Rule | catalogrule | conditions_serialized, actions_serialized |
234+
| \Magento\CustomerSegment\Model\Segment | magento_customersegment_segment | conditions_serialized |
235+
| \Magento\Sales\Model\Order\Creditmemo\Item | sales_creditmemo_item | tax_ratio |
236+
| \Magento\Sales\Model\Order\Invoice\Item | sales_invoice_item | tax_ratio |
237+
| \Magento\User\Model\User | admin_user | extra |
238+
| \Magento\Catalog\Model\ResourceModel\Eav\Attribute | catalog_eav_attribute | additional_data |
239+
| \Magento\Support\Model\ResourceModel\Report | support_report | report_data |
240+
| \Magento\Logging\Block\Adminhtml\Details | magento_logging_event | info |
241+
| \Magento\Logging\Block\Adminhtml\Details\Renderer\Diff | magento_logging_event_changes | original_data, result_data |
242+
| \Magento\Rma\Model\Item, \Magento\Rma\Model\Rma | magento_rma_item_entity | product_options |
243+
| \Magento\Rma\Model\Shipping, \Magento\Rma\Model\Shipping\LabelService | magento_rma_shipping_label | packages |
244+
| \Magento\GiftRegistry\Model\Person, \Magento\GiftRegistry\Model\ResourceModel\Person | magento_giftregistry_person | custom_values |
245+
| \Magento\GiftRegistry\Model\Entity, \Magento\GiftRegistry\Model\ResourceModel\Entity | magento_giftregistry_entity | custom_values, shipping_address |
246+
| \Magento\ScheduledImportExport\Model\Scheduled\Operation | magento_scheduled_operations | file_info, entity_attributes |
247+
248+
{% endcollapsible %}
249+
250+
### Table deprecations
251+
252+
The table for `\Magento\Widget\Model\ResourceModel\Widget` has been deprecated.
253+
254+
### New Class: `FieldDataConverter`
255+
256+
This class supports data conversion from one format to another.
257+
It can be used to upgrade data in upgrade scripts.
258+
259+
#### Features
260+
261+
* Ability to process records in batches
262+
* Can use the `where` condition
263+
* Update multiple fields in a table at once
264+
* Update records in multiple threads
265+
* Convert nested serialized data
266+
* Update duplicate records at once
267+
268+
## Input/Output Format of Methods
269+
270+
The following methods now return JSON instead of a serialized string.
271+
272+
{% collapsible Show methods %}
273+
274+
* `\Magento\Catalog\Model\Product\Option\Type\File::prepareForCart()`
275+
* `\Magento\CatalogInventory\Helper\Minsaleqty::serializeValue($value)`
276+
* Only if `$value` is array type
277+
* `\Magento\Widget\Helper\Conditions::encode($value)`
278+
* `\Magento\Wishlist\Model\Item\Option::getValue`
279+
* `\Magento\Wishlist\Model\Item\Option::getData('value',...)`
280+
* `\Magento\Widget\Model\Widget\Instance::getData('widget_parameters')`
281+
* `\Magento\Sales\Model\Order\Creditmemo\Item::getTaxRatio`
282+
* `\Magento\Sales\Model\Order\Invoice\Item::getTaxRatio`
283+
* `\Magento\Quote\Model\Quote\Address\Total::getAppliedTaxes()`
284+
* `\Magento\Catalog\Model\ResourceModel\Eav\Attribute::getData('additional_data')`
285+
* `\Magento\Catalog\Model\ResourceModel\Eav\Attribute::getAdditionalData()`
286+
* `\Magento\Sales\Model\Order\Item::getProductOptions()`
287+
* Return value is an array, applicable only for "bundle_selection_attributes" key
288+
* `\Magento\Quote\Model\Quote\Item::getOptionByCode`
289+
* `info_buyRequest` option
290+
* `\Magento\Rule\Model\AbstractModel::getConditionsSerialized()`
291+
* `\Magento\Catalog\Model\Product->getCustomOption('attributes')->getValue()`
292+
* `\Magento\CatalogInventory\Helper\Minsaleqty::makeStorableArrayFieldValue()`
293+
* `\Magento\Catalog\Model\Product\Option\Type\File::prepareForCart()`
294+
* `\Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface::getValue()`
295+
* `\Magento\Quote\Model\Quote\Item\Option::getValue()`
296+
* `\Magento\Catalog\Model\Product\Configuration\Item\ItemInterface::getOptionByCode('bundle_selection_ids')->getValue()`
297+
* `\Magento\Sales\Model\Order\Item::getProductOptions()['bundle_selection_ids']`
298+
* `\Magento\Catalog\Model\Product::getCustomOption('bundle_selection_ids')`
299+
* `\Magento\Rma\Model\Shipping::getPackages()`
300+
* `\Magento\Rma\Model\Item::getProductOptions()`
301+
* `\Magento\Logging\Model\Event\Changes::getResultData()`
302+
* `\Magento\Logging\Model\Event::getInfo()`
303+
* `\Magento\GiftCardAccount\Helper\Data::getCards()`
304+
* `\Magento\Sales\Api\Data\OrderInterface`
305+
* ['extension_attributes' => 'gift_cards' => JSON]
306+
307+
{% endcollapsible %}
308+
309+
The following methods now require JSON as a parameter instead of a serialized string.
310+
311+
{% collapsible Show methods %}
312+
313+
* `\Magento\Catalog\Model\Product\Option\Type\File::getFormattedOptionValue($optionValue)`
314+
* `\Magento\Catalog\Model\Product\Option\Type\File::_unserializeValue($value)`
315+
* `\Magento\Catalog\Model\Product\Option\Type\File::getEditableOptionValue($optionValue)`
316+
* `\Magento\Catalog\Model\Product\Option\Type\File::prepareOptionValueForRequest($optionValue)`
317+
* `\Magento\CatalogInventory\Helper\Minsaleqty::unserializeValue($value)`
318+
* `\Magento\Widget\Helper\Conditions::decode($value)`
319+
* `\Magento\Wishlist\Model\Item\Option::setValue($value)`
320+
* `\Magento\Wishlist\Model\Item\Option::setData('value', $value)`
321+
* `\Magento\Widget\Model\Widget\Instance::setData('widget_parameters', $value)`
322+
* `\Magento\Sales\Model\Order\Creditmemo\Item::setTaxRatio($value)`
323+
* `\Magento\Sales\Model\Order\Invoice\Item::setTaxRatio($value)`
324+
* `\Magento\Quote\Model\Quote\Address\Total::setAppliedTaxes($value)`
325+
* `\Magento\Quote\Model\Quote\Address\Total::setFullInfo($value)`
326+
* Only for string values
327+
* `\Magento\Catalog\Model\ResourceModel\Eav\Attribute::setData('additional_data', $value)`
328+
* `\Magento\Catalog\Model\ResourceModel\Eav\Attribute::setAdditionalData($value)`
329+
* `\Magento\Sales\Model\Order\Item::setProductOptions($value)`
330+
* `$value` is an array, applicable only for `bundle_selection_attributes` key
331+
* `\Magento\Quote\Model\Quote\Item::setOptionByCode`
332+
* `info_buyRequest` option
333+
* `\Magento\Rule\Model\AbstractModel::setConditionsSerialized($value)`
334+
* `\Magento\Catalog\Model\Product::addCustomOption('attributes', $value)`
335+
* For attributes `bundle_selection_ids` key
336+
* `\Magento\UrlRewrite\Model\UrlRewrite::setMetadata($value)`
337+
* For non array values
338+
* `\Magento\UrlRewrite\Service\V1\Data::setMetadata($value)`
339+
* For non array values
340+
* `\Magento\UrlRewrite\Model\UrlPersistInterface::deleteByData()`
341+
* For metadata key
342+
* `\Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface::setValue($value)`
343+
* `\Magento\Quote\Model\Quote\Item\Option::setValue($value)`
344+
* `\Magento\Rma\Model\Shipping::setPackages($value)`
345+
* `\Magento\Rma\Model\Item::setProductOptions($value)`
346+
* `\Magento\Logging\Model\Event\Changes::setResultData($value)`
347+
* `\Magento\Sales\Api\Data\OrderInterface`
348+
* ['extension_attributes' => 'gift_cards' => JSON]
349+
350+
{% endcollapsible %}
351+
352+
### Other class changes
353+
354+
| Class | Change |
355+
| -------------------------------------------------------------- | --------------------------------- |
356+
| `Magento\Framework\Acl\Cache` | Class removed |
357+
| `Magento\Framework\Acl\Builder::__construct` | [public] Method parameter changed |
358+
| `Magento\Framework\Acl\Builder::$_cache` | [protected] Property removed |
359+
| `Magento\User\Model\ResourceModel\User::__construct` | [public] Method parameter changed |
360+
| `Magento\User\Model\ResourceModel\User::$_aclCache` | [protected] Property removed |
361+
| `Magento\Authorization\Model\ResourceModel\Rules::__construct` | [public] Method parameter changed |
362+
| `Magento\Authorization\Model\ResourceModel\Rules::$_aclCache` | [protected] Property removed |

0 commit comments

Comments
 (0)