Skip to content

Commit 38e5899

Browse files
author
Prabhu Ram
committed
Merge remote-tracking branch 'mainline/2.3-develop' into MC-20255
2 parents 6bcc8ff + c6cf182 commit 38e5899

File tree

180 files changed

+6922
-1705
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+6922
-1705
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a
1111

1212
* [Installation Guide](https://devdocs.magento.com/guides/v2.3/install-gde/bk-install-guide.html).
1313

14+
## Learn More About GraphQL in Magento 2
15+
16+
* [GraphQL Developer Guide](https://devdocs.magento.com/guides/v2.3/graphql/index.html)
17+
1418
<h2>Contributing to the Magento 2 Code Base</h2>
1519
Contributions can take the form of new components or features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes, optimizations, or just good suggestions.
1620

app/code/Magento/AdminNotification/etc/db_schema.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
1010
<table name="adminnotification_inbox" resource="default" engine="innodb" comment="Adminnotification Inbox">
1111
<column xsi:type="int" name="notification_id" padding="10" unsigned="true" nullable="false" identity="true"
12-
comment="Notification id"/>
12+
comment="Notification ID"/>
1313
<column xsi:type="smallint" name="severity" padding="5" unsigned="true" nullable="false" identity="false"
1414
default="0" comment="Problem type"/>
1515
<column xsi:type="timestamp" name="date_added" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
@@ -35,7 +35,7 @@
3535
</index>
3636
</table>
3737
<table name="admin_system_messages" resource="default" engine="innodb" comment="Admin System Messages">
38-
<column xsi:type="varchar" name="identity" nullable="false" length="100" comment="Message id"/>
38+
<column xsi:type="varchar" name="identity" nullable="false" length="100" comment="Message ID"/>
3939
<column xsi:type="smallint" name="severity" padding="5" unsigned="true" nullable="false" identity="false"
4040
default="0" comment="Problem type"/>
4141
<column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"

app/code/Magento/AdvancedPricingImportExport/Model/Export/AdvancedPricing.php

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
*/
66
namespace Magento\AdvancedPricingImportExport\Model\Export;
77

8-
use Magento\ImportExport\Model\Export;
9-
use Magento\Store\Model\Store;
10-
use Magento\CatalogImportExport\Model\Import\Product as ImportProduct;
118
use Magento\AdvancedPricingImportExport\Model\Import\AdvancedPricing as ImportAdvancedPricing;
129
use Magento\Catalog\Model\Product as CatalogProduct;
10+
use Magento\CatalogImportExport\Model\Import\Product as ImportProduct;
11+
use Magento\ImportExport\Model\Export;
12+
use Magento\Store\Model\Store;
1313

1414
/**
1515
* Export Advanced Pricing
@@ -150,6 +150,8 @@ public function __construct(
150150
}
151151

152152
/**
153+
* Init type models
154+
*
153155
* @return $this
154156
* @throws \Magento\Framework\Exception\LocalizedException
155157
*/
@@ -172,7 +174,9 @@ protected function initTypeModels()
172174
}
173175
if ($model->isSuitable()) {
174176
$this->_productTypeModels[$productTypeName] = $model;
177+
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
175178
$this->_disabledAttrs = array_merge($this->_disabledAttrs, $model->getDisabledAttrs());
179+
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
176180
$this->_indexValueAttributes = array_merge(
177181
$this->_indexValueAttributes,
178182
$model->getIndexValueAttributes()
@@ -197,6 +201,7 @@ protected function initTypeModels()
197201
public function export()
198202
{
199203
//Execution time may be very long
204+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
200205
set_time_limit(0);
201206

202207
$writer = $this->getWriter();
@@ -234,16 +239,6 @@ public function filterAttributeCollection(\Magento\Eav\Model\ResourceModel\Entit
234239

235240
foreach ($collection as $attribute) {
236241
if (in_array($attribute->getAttributeCode(), $this->_disabledAttrs)) {
237-
if (isset($this->_parameters[\Magento\ImportExport\Model\Export::FILTER_ELEMENT_SKIP])) {
238-
if ($attribute->getAttributeCode() == ImportAdvancedPricing::COL_TIER_PRICE
239-
&& in_array(
240-
$attribute->getId(),
241-
$this->_parameters[\Magento\ImportExport\Model\Export::FILTER_ELEMENT_SKIP]
242-
)
243-
) {
244-
$this->_passTierPrice = 1;
245-
}
246-
}
247242
$collection->removeItemByKey($attribute->getId());
248243
}
249244
}
@@ -363,6 +358,7 @@ private function prepareExportData(
363358
$linkedTierPricesData = [];
364359
foreach ($tierPricesData as $tierPriceData) {
365360
$sku = $productLinkIdToSkuMap[$tierPriceData['product_link_id']];
361+
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
366362
$linkedTierPricesData[] = array_merge(
367363
$tierPriceData,
368364
[ImportAdvancedPricing::COL_SKU => $sku]
@@ -471,7 +467,7 @@ private function fetchTierPrices(array $productIds): array
471467
ImportAdvancedPricing::COL_TIER_PRICE_QTY => 'ap.qty',
472468
ImportAdvancedPricing::COL_TIER_PRICE => 'ap.value',
473469
ImportAdvancedPricing::COL_TIER_PRICE_PERCENTAGE_VALUE => 'ap.percentage_value',
474-
'product_link_id' => 'ap.' .$productEntityLinkField,
470+
'product_link_id' => 'ap.' . $productEntityLinkField,
475471
];
476472
if ($exportFilter && array_key_exists('tier_price', $exportFilter)) {
477473
if (!empty($exportFilter['tier_price'][0])) {
@@ -488,7 +484,7 @@ private function fetchTierPrices(array $productIds): array
488484
$selectFields
489485
)
490486
->where(
491-
'ap.'.$productEntityLinkField.' IN (?)',
487+
'ap.' . $productEntityLinkField . ' IN (?)',
492488
$productIds
493489
);
494490

@@ -602,7 +598,7 @@ protected function _getWebsiteCode(int $websiteId): string
602598
}
603599

604600
if ($storeName && $currencyCode) {
605-
$code = $storeName.' ['.$currencyCode.']';
601+
$code = $storeName . ' [' . $currencyCode . ']';
606602
} else {
607603
$code = $storeName;
608604
}

app/code/Magento/AdvancedSearch/etc/db_schema.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
1010
<table name="catalogsearch_recommendations" resource="default" engine="innodb"
1111
comment="Advanced Search Recommendations">
12-
<column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
12+
<column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="ID"/>
1313
<column xsi:type="int" name="query_id" padding="10" unsigned="true" nullable="false" identity="false"
14-
default="0" comment="Query Id"/>
14+
default="0" comment="Query ID"/>
1515
<column xsi:type="int" name="relation_id" padding="10" unsigned="true" nullable="false" identity="false"
16-
default="0" comment="Relation Id"/>
16+
default="0" comment="Relation ID"/>
1717
<constraint xsi:type="primary" referenceId="PRIMARY">
1818
<column name="id"/>
1919
</constraint>

app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
<section name="LocaleOptionsSection">
1212
<element name="sectionHeader" type="text" selector="#general_locale-head"/>
1313
<element name="timezone" type="select" selector="#general_locale_timezone"/>
14+
<element name="locale" type="select" selector="#general_locale_code"/>
15+
<element name="localeEnabled" type="select" selector="#general_locale_code:enabled"/>
16+
<element name="localeDisabled" type="select" selector="#general_locale_code[disabled=disabled]"/>
1417
<element name="useDefault" type="checkbox" selector="#general_locale_timezone_inherit"/>
1518
</section>
1619
</sections>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminCheckLocaleAndDeveloperConfigInDeveloperModeTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<title value="Check locale dropdown and developer configuration page are available in developer mode"/>
15+
<description value="Check locale dropdown and developer configuration page are available in developer mode"/>
16+
<group value="backend"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-20374"/>
19+
<group value="developer_mode_only"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
24+
</before>
25+
26+
<!-- Go to the general configuration and make sure the locale dropdown is available and enabled -->
27+
<actionGroup ref="AdminOpenStoreConfigPageActionGroup" stepKey="openStoreConfigPage" />
28+
<scrollTo selector="{{LocaleOptionsSection.sectionHeader}}" stepKey="scrollToLocaleSection" x="0" y="-80" />
29+
<conditionalClick selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.timezone}}" visible="false" stepKey="openLocaleSection"/>
30+
<seeElement selector="{{LocaleOptionsSection.localeEnabled}}" stepKey="seeEnabledLocaleDropdown"/>
31+
32+
<!-- Go to the developer configuration and make sure the page is available -->
33+
<actionGroup ref="AdminOpenStoreConfigDeveloperPageActionGroup" stepKey="goToDeveloperConfigPage"/>
34+
<seeInCurrentUrl url="{{AdminConfigDeveloperPage.url}}" stepKey="seeDeveloperConfigUrl"/>
35+
<seeElement selector="{{AdminConfigSection.navItemByTitle('Developer')}}" stepKey="assertDeveloperNavItemPresent" />
36+
</test>
37+
</tests>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminCheckLocaleAndDeveloperConfigInProductionModeTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<title value="Check locale dropdown and developer configuration page are not available in production mode"/>
15+
<description value="Check locale dropdown and developer configuration page are not available in production mode"/>
16+
<testCaseId value="MC-14106" />
17+
<severity value="MAJOR"/>
18+
<group value="backend"/>
19+
<group value="production_mode_only"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
24+
</before>
25+
26+
<!-- Go to the general configuration and make sure the locale dropdown is disabled -->
27+
<actionGroup ref="AdminOpenStoreConfigPageActionGroup" stepKey="openStoreConfigPage" />
28+
<scrollTo selector="{{LocaleOptionsSection.sectionHeader}}" stepKey="scrollToLocaleSection" x="0" y="-80" />
29+
<conditionalClick selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.timezone}}" visible="false" stepKey="openLocaleSection"/>
30+
<assertElementContainsAttribute selector="{{LocaleOptionsSection.locale}}" attribute="disabled" stepKey="seeDisabledLocaleDropdown" />
31+
32+
<!-- Go to the developer configuration and make sure the redirect to the configuration page takes place -->
33+
<actionGroup ref="AdminOpenStoreConfigDeveloperPageActionGroup" stepKey="goToDeveloperConfigPage"/>
34+
<seeInCurrentUrl url="{{AdminConfigPage.url}}index/" stepKey="seeConfigurationIndexUrl"/>
35+
36+
<actionGroup ref="AdminExpandConfigTabActionGroup" stepKey="expandAdvancedTab">
37+
<argument name="tabName" value="Advanced" />
38+
</actionGroup>
39+
<dontSeeElement selector="{{AdminConfigSection.navItemByTitle('Developer')}}" stepKey="assertDeveloperNavItemAbsent" />
40+
</test>
41+
</tests>

app/code/Magento/Braintree/README.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,47 @@
1-
Module Magento\Braintree implements integration with the Braintree payment system.
1+
# Magento_Braintree module
2+
3+
The Magento_Braintree module implements integration with the Braintree payment system.
4+
5+
## Extensibility
6+
7+
Extension developers can interact with the Magento_Braintree module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html).
8+
9+
[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Braintree module.
10+
11+
### Events
12+
13+
This module observes the following events:
14+
15+
- `payment_method_assign_data_braintree` event in `Magento\Braintree\Observer\DataAssignObserver` file.
16+
- `payment_method_assign_data_braintree_paypal` event in `Magento\Braintree\Observer\DataAssignObserver` file.
17+
- `shortcut_buttons_container` event in `Magento\Braintree\Observer\AddPaypalShortcuts` file.
18+
19+
For information about an event in Magento 2, see [Events and observers](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/events-and-observers.html#events).
20+
21+
### Layouts
22+
23+
This module interacts with the following layouts and layout handles in the `view/adminhtml/layout` directory:
24+
25+
- `braintree_paypal_review`
26+
- `checkout_index_index`
27+
- `multishipping_checkout_billing`
28+
- `vault_cards_listaction`
29+
30+
This module interacts with the following layout handles in the `view/frontend/layout` directory:
31+
32+
- `adminhtml_system_config_edit`
33+
- `braintree_report_index`
34+
- `sales_order_create_index`
35+
- `sales_order_create_load_block_billing_method`
36+
37+
For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-overview.html).
38+
39+
### UI components
40+
41+
You can extend admin notifications using the `view/adminhtml/ui_component/braintree_report.xml` configuration file.
42+
43+
For information about UI components in Magento 2, see [Overview of UI components](https://devdocs.magento.com/guides/v2.3/ui_comp_guide/bk-ui_comps.html).
44+
45+
## Additional information
46+
47+
For information about significant changes in patch releases, see [2.3.x Release information](https://devdocs.magento.com/guides/v2.3/release-notes/bk-release-notes.html).

app/code/Magento/BraintreeGraphQl/etc/schema.graphqls

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See COPYING.txt for license details.
33

44
type Mutation {
5-
createBraintreeClientToken: String! @resolver(class: "\\Magento\\BraintreeGraphQl\\Model\\Resolver\\CreateBraintreeClientToken") @doc(description:"Creates Braintree Client Token for creating client-side nonce.")
5+
createBraintreeClientToken: String! @resolver(class: "\\Magento\\BraintreeGraphQl\\Model\\Resolver\\CreateBraintreeClientToken") @doc(description:"Creates Client Token for Braintree Javascript SDK initialization.")
66
}
77

88
input PaymentMethodInput {
@@ -11,9 +11,9 @@ input PaymentMethodInput {
1111
}
1212

1313
input BraintreeInput {
14-
payment_method_nonce: String!
15-
is_active_payment_token_enabler: Boolean!
16-
device_data: String
14+
payment_method_nonce: String! @doc(description:"The one-time payment token generated by Braintree payment gateway based on card details. Required field to make sale transaction.")
15+
is_active_payment_token_enabler: Boolean! @doc(description:"States whether an entered by a customer credit/debit card should be tokenized for later usage. Required only if Vault is enabled for Braintree payment integration.")
16+
device_data: String @doc(description:"Contains a fingerprint provided by Braintree JS SDK and should be sent with sale transaction details to the Braintree payment gateway. Should be specified only in a case if Kount (advanced fraud protection) is enabled for Braintree payment integration.")
1717
}
1818

1919
input BraintreeCcVaultInput {

0 commit comments

Comments
 (0)