dataObjectProcessor->buildOutputDataArray($dataObject, $dataObjectType);
//process custom attributes if present
+ $dataObjectArray = $this->processCustomAttributes($dataObjectArray, $skipAttributes);
+
+ if (!empty($dataObjectArray[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY])) {
+ /** @var array $extensionAttributes */
+ $extensionAttributes = $dataObjectArray[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY];
+ unset($dataObjectArray[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]);
+ foreach ($extensionAttributes as $attributeKey => $attributeValue) {
+ if (!in_array($attributeKey, $skipAttributes)) {
+ $dataObjectArray[$attributeKey] = $attributeValue;
+ }
+ }
+ }
+ return $dataObjectArray;
+ }
+
+ /**
+ * Recursive process array to process customer attributes
+ *
+ * @param array $dataObjectArray
+ * @param array $skipAttributes
+ * @return array
+ */
+ private function processCustomAttributes(array $dataObjectArray, array $skipAttributes): array
+ {
if (!empty($dataObjectArray[AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY])) {
/** @var AttributeValue[] $customAttributes */
$customAttributes = $dataObjectArray[AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY];
@@ -56,14 +80,9 @@ public function toNestedArray(
}
}
}
- if (!empty($dataObjectArray[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY])) {
- /** @var array $extensionAttributes */
- $extensionAttributes = $dataObjectArray[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY];
- unset($dataObjectArray[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]);
- foreach ($extensionAttributes as $attributeKey => $attributeValue) {
- if (!in_array($attributeKey, $skipAttributes)) {
- $dataObjectArray[$attributeKey] = $attributeValue;
- }
+ foreach ($dataObjectArray as $key => $value) {
+ if (is_array($value)) {
+ $dataObjectArray[$key] = $this->processCustomAttributes($value, $skipAttributes);
}
}
return $dataObjectArray;
diff --git a/lib/internal/Magento/Framework/Api/Test/Unit/ExtensibleDataObjectConverterTest.php b/lib/internal/Magento/Framework/Api/Test/Unit/ExtensibleDataObjectConverterTest.php
index f0e333aa5e1d5..08fad90fe2f29 100644
--- a/lib/internal/Magento/Framework/Api/Test/Unit/ExtensibleDataObjectConverterTest.php
+++ b/lib/internal/Magento/Framework/Api/Test/Unit/ExtensibleDataObjectConverterTest.php
@@ -10,6 +10,9 @@
use Magento\Framework\Api\AbstractExtensibleObject;
use Magento\Framework\Api\AttributeValue;
+/**
+ * Class ExtensibleDataObjectConverterTest
+ */
class ExtensibleDataObjectConverterTest extends \PHPUnit\Framework\TestCase
{
/** @var \Magento\Framework\Api\ExtensibleDataObjectConverter */
@@ -83,6 +86,17 @@ public function testToNestedArrayCustom()
AttributeValue::VALUE => 'custom_attribute_value_skip',
],
],
+ 'test' => [
+ 0 => [
+ '3rd_attribute_key' => '3rd_attribute_value',
+ AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY => [
+ [
+ AttributeValue::ATTRIBUTE_CODE => 'another_custom_attribute_code',
+ AttributeValue::VALUE => 'another_custom_attribute_value',
+ ]
+ ]
+ ]
+ ]
];
$resultArray = [
@@ -92,6 +106,12 @@ public function testToNestedArrayCustom()
'custom_attribute_value_multi_1',
'custom_attribute_value_multi_2',
],
+ 'test' => [
+ 0 => [
+ '3rd_attribute_key' => '3rd_attribute_value',
+ 'another_custom_attribute_code' => 'another_custom_attribute_value',
+ ]
+ ]
];
$this->processor->expects($this->any())
diff --git a/lib/web/css/docs/source/_breadcrumbs.less b/lib/web/css/docs/source/_breadcrumbs.less
index 848af20c0728e..5b5df991e3cdc 100644
--- a/lib/web/css/docs/source/_breadcrumbs.less
+++ b/lib/web/css/docs/source/_breadcrumbs.less
@@ -8,7 +8,7 @@
//
// Breadcrumbs layout with links can be separated by any symbol, for example >
symbol.
//
-// The following markup corresponds to the accesibility demands:
+// The following markup corresponds to the accessibility demands:
// ```html
//
// You are here:
diff --git a/lib/web/css/docs/source/_pages.less b/lib/web/css/docs/source/_pages.less
index 6b01fa7549e92..59eb121112d28 100644
--- a/lib/web/css/docs/source/_pages.less
+++ b/lib/web/css/docs/source/_pages.less
@@ -4,7 +4,7 @@
// */
// # Pagination HTML markup
-// Pagination is used to display numbers of pages in case content exceeds page limits. The markup corresponds to accesibility demands.
+// Pagination is used to display numbers of pages in case content exceeds page limits. The markup corresponds to accessibility demands.
//
// Required HTML markup:
// ```html
diff --git a/lib/web/css/docs/source/_popups.less b/lib/web/css/docs/source/_popups.less
index b192219b6438f..7251cde45bc3c 100644
--- a/lib/web/css/docs/source/_popups.less
+++ b/lib/web/css/docs/source/_popups.less
@@ -245,7 +245,7 @@
//
@popup-title-headings__level |
// h3 |
// h1 | h2 | h3 | h4 | h5 | h6 |
-// What heading style is applyed to the popup title |
+// What heading style is applied to the popup title |
//
//
// Popup close button |
diff --git a/lib/web/css/docs/source/_responsive.less b/lib/web/css/docs/source/_responsive.less
index 46c19bc23a66c..8e7397d6ad6f3 100644
--- a/lib/web/css/docs/source/_responsive.less
+++ b/lib/web/css/docs/source/_responsive.less
@@ -81,7 +81,7 @@
//
// ## Gathering
//
-// Everything that you include in collector mixins above will go in place where they declarated.
+// Everything that you include in collector mixins above will go in place where they declared.
// As example all
// ```css
// .media-width(@extremum, @break) {
diff --git a/lib/web/css/source/lib/_typography.less b/lib/web/css/source/lib/_typography.less
index 62529fe08d1c8..3ca09d3782619 100644
--- a/lib/web/css/source/lib/_typography.less
+++ b/lib/web/css/source/lib/_typography.less
@@ -11,7 +11,8 @@
@family-name,
@font-path,
@font-weight: normal,
- @font-style: normal
+ @font-style: normal,
+ @font-display: auto
) {
@font-face {
font-family: @family-name;
@@ -19,6 +20,7 @@
url('@{font-path}.woff') format('woff');
font-weight: @font-weight;
font-style: @font-style;
+ font-display: @font-display;
}
}
diff --git a/setup/performance-toolkit/benchmark.jmx b/setup/performance-toolkit/benchmark.jmx
index 0609be4d7d193..a8a7e419373b8 100644
--- a/setup/performance-toolkit/benchmark.jmx
+++ b/setup/performance-toolkit/benchmark.jmx
@@ -41347,7 +41347,7 @@ vars.put("product_sku", product.get("sku"));
false
- {"query":"mutation { \n addSimpleProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cartItems: [\n {\n data: {\n quantity: 2\n sku: \"${product_sku}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n quantity\n product {\n sku\n }\n }\n }\n }\n}","variables":null,"operationName":null}
+ {"query":"mutation { \n addSimpleProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cart_items: [\n {\n data: {\n quantity: 2\n sku: \"${product_sku}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n quantity\n product {\n sku\n }\n }\n }\n }\n}","variables":null,"operationName":null}
=
@@ -41567,7 +41567,7 @@ vars.put("product_sku", product.get("sku"));
false
- {"query":"mutation {\n addConfigurableProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cartItems: [\n {\n variant_sku: \"${product_option}\"\n data: {\n quantity: 2\n sku: \"${product_option}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n id\n quantity\n product {\n name\n sku\n }\n ... on ConfigurableCartItem {\n configurable_options {\n option_label\n }\n }\n }\n }\n }\n}","variables":null,"operationName":null}
+ {"query":"mutation {\n addConfigurableProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cart_items: [\n {\n variant_sku: \"${product_option}\"\n data: {\n quantity: 2\n sku: \"${product_option}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n id\n quantity\n product {\n name\n sku\n }\n ... on ConfigurableCartItem {\n configurable_options {\n option_label\n }\n }\n }\n }\n }\n}","variables":null,"operationName":null}
=
@@ -41739,7 +41739,7 @@ vars.put("product_sku", product.get("sku"));
false
- {"query":"mutation { \n addSimpleProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cartItems: [\n {\n data: {\n quantity: 2\n sku: \"${product_sku}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n quantity\n product {\n sku\n }\n }\n }\n }\n}","variables":null,"operationName":null}
+ {"query":"mutation { \n addSimpleProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cart_items: [\n {\n data: {\n quantity: 2\n sku: \"${product_sku}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n quantity\n product {\n sku\n }\n }\n }\n }\n}","variables":null,"operationName":null}
=
@@ -42045,7 +42045,7 @@ vars.put("product_sku", product.get("sku"));
false
- {"query":"mutation {\n addConfigurableProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cartItems: [\n {\n variant_sku: \"${product_option}\"\n data: {\n quantity: 2\n sku: \"${product_option}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n id\n quantity\n product {\n name\n sku\n }\n ... on ConfigurableCartItem {\n configurable_options {\n option_label\n }\n }\n }\n }\n }\n}","variables":null,"operationName":null}
+ {"query":"mutation {\n addConfigurableProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cart_items: [\n {\n variant_sku: \"${product_option}\"\n data: {\n quantity: 2\n sku: \"${product_option}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n id\n quantity\n product {\n name\n sku\n }\n ... on ConfigurableCartItem {\n configurable_options {\n option_label\n }\n }\n }\n }\n }\n}","variables":null,"operationName":null}
=
@@ -42303,7 +42303,7 @@ vars.put("product_sku", product.get("sku"));
false
- {"query":"mutation { \n addSimpleProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cartItems: [\n {\n data: {\n quantity: 2\n sku: \"${product_sku}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n quantity\n product {\n sku\n }\n }\n }\n }\n}","variables":null,"operationName":null}
+ {"query":"mutation { \n addSimpleProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cart_items: [\n {\n data: {\n quantity: 2\n sku: \"${product_sku}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n quantity\n product {\n sku\n }\n }\n }\n }\n}","variables":null,"operationName":null}
=
@@ -42609,7 +42609,7 @@ vars.put("product_sku", product.get("sku"));
false
- {"query":"mutation {\n addConfigurableProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cartItems: [\n {\n variant_sku: \"${product_option}\"\n data: {\n quantity: 2\n sku: \"${product_option}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n id\n quantity\n product {\n name\n sku\n }\n ... on ConfigurableCartItem {\n configurable_options {\n option_label\n }\n }\n }\n }\n }\n}","variables":null,"operationName":null}
+ {"query":"mutation {\n addConfigurableProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cart_items: [\n {\n variant_sku: \"${product_option}\"\n data: {\n quantity: 2\n sku: \"${product_option}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n id\n quantity\n product {\n name\n sku\n }\n ... on ConfigurableCartItem {\n configurable_options {\n option_label\n }\n }\n }\n }\n }\n}","variables":null,"operationName":null}
=
@@ -42867,7 +42867,7 @@ vars.put("product_sku", product.get("sku"));
false
- {"query":"mutation { \n addSimpleProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cartItems: [\n {\n data: {\n quantity: 2\n sku: \"${product_sku}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n quantity\n product {\n sku\n }\n }\n }\n }\n}","variables":null,"operationName":null}
+ {"query":"mutation { \n addSimpleProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cart_items: [\n {\n data: {\n quantity: 2\n sku: \"${product_sku}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n quantity\n product {\n sku\n }\n }\n }\n }\n}","variables":null,"operationName":null}
=
@@ -43094,7 +43094,7 @@ vars.put("product_sku", product.get("sku"));
false
- {"query":"mutation { \n addSimpleProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cartItems: [\n {\n data: {\n quantity: 2\n sku: \"${product_sku}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n quantity\n product {\n sku\n }\n }\n }\n }\n}","variables":null,"operationName":null}
+ {"query":"mutation { \n addSimpleProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cart_items: [\n {\n data: {\n quantity: 2\n sku: \"${product_sku}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n quantity\n product {\n sku\n }\n }\n }\n }\n}","variables":null,"operationName":null}
=
@@ -43959,7 +43959,7 @@ vars.put("product_sku", product.get("sku"));
false
- {"query":"mutation {\n addConfigurableProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cartItems: [\n {\n variant_sku: \"${product_option}\"\n data: {\n quantity: 2\n sku: \"${product_option}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n id\n quantity\n product {\n name\n sku\n }\n ... on ConfigurableCartItem {\n configurable_options {\n option_label\n }\n }\n }\n }\n }\n}","variables":null,"operationName":null}
+ {"query":"mutation {\n addConfigurableProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cart_items: [\n {\n variant_sku: \"${product_option}\"\n data: {\n quantity: 2\n sku: \"${product_option}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n id\n quantity\n product {\n name\n sku\n }\n ... on ConfigurableCartItem {\n configurable_options {\n option_label\n }\n }\n }\n }\n }\n}","variables":null,"operationName":null}
=
@@ -44019,7 +44019,7 @@ vars.put("product_sku", product.get("sku"));
false
- {"query":"mutation { \n addSimpleProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cartItems: [\n {\n data: {\n quantity: 2\n sku: \"${product_sku}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n quantity\n product {\n sku\n }\n }\n }\n }\n}","variables":null,"operationName":null}
+ {"query":"mutation { \n addSimpleProductsToCart(\n input: {\n cart_id: \"${quote_id}\"\n cart_items: [\n {\n data: {\n quantity: 2\n sku: \"${product_sku}\"\n }\n }\n ]\n }\n ) {\n cart {\n items {\n quantity\n product {\n sku\n }\n }\n }\n }\n}","variables":null,"operationName":null}
=