Skip to content

Commit d167013

Browse files
committed
Merge branch '2.3-develop' of github.com:magento/magento2 into 2.3-develop#911
2 parents 2c4adbf + ea71192 commit d167013

File tree

685 files changed

+24982
-5395
lines changed

Some content is hidden

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

685 files changed

+24982
-5395
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/Analytics/README.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
1-
# Magento_Analytics Module
1+
# Magento_Analytics module
22

33
The Magento_Analytics module integrates your Magento instance with the [Magento Business Intelligence (MBI)](https://magento.com/products/business-intelligence) to use [Advanced Reporting](https://devdocs.magento.com/guides/v2.3/advanced-reporting/modules.html) functionality.
44

55
The module implements the following functionality:
66

7-
* enabling subscription to the MBI and automatic re-subscription
8-
* changing the base URL with the same MBI account remained
9-
* declaring the configuration schemas for report data collection
10-
* collecting the Magento instance data as reports for the MBI
11-
* introducing API that provides the collected data
12-
* extending Magento configuration with the module parameters:
13-
* subscription status (enabled/disabled)
14-
* industry (a business area in which the instance website works)
15-
* time of data collection (time of the day when the module collects data)
7+
- Enabling subscription to Magento Business Intelligence (MBI) and automatic re-subscription
8+
- Declaring the configuration schemas for report data collection
9+
- Collecting the Magento instance data as reports for MBI
10+
- Introducing API that provides the collected data
11+
- Extending Magento configuration with the module parameters:
12+
- Subscription status (enabled/disabled)
13+
- Industry (a business area in which the instance website works)
14+
- Time of data collection (time of the day when the module collects data)
15+
16+
## Installation details
17+
18+
Before disabling or uninstalling this module, note that the following modules depends on this module:
19+
- Magento_CatalogAnalytics
20+
- Magento_CustomerAnalytics
21+
- Magento_QuoteAnalytics
22+
- Magento_ReviewAnalytics
23+
- Magento_SalesAnalytics
24+
- Magento_WishlistAnalytics
1625

1726
## Structure
1827

@@ -29,12 +38,12 @@ The subscription to the MBI service is enabled during the installation process o
2938
Configuration settings for the Analytics module can be modified in the Admin Panel on the Stores > Configuration page under the General > Advanced Reporting tab.
3039

3140
The following options can be adjusted:
32-
* Advanced Reporting Service (Enabled/Disabled)
33-
* Alters the status of the Advanced Reporting subscription
34-
* Time of day to send data (Hour/Minute/Second in the store's time zone)
35-
* Defines when the data collection process for the Advanced Reporting service occurs
36-
* Industry
37-
* Defines the industry of the store in order to create a personalized Advanced Reporting experience
41+
- Advanced Reporting Service (Enabled/Disabled)
42+
- Alters the status of the Advanced Reporting subscription
43+
- Time of day to send data (Hour/Minute/Second in the store's time zone)
44+
- Defines when the data collection process for the Advanced Reporting service occurs
45+
- Industry
46+
- Defines the industry of the store in order to create a personalized Advanced Reporting experience
3847

3948
## Extensibility
4049

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationTimeToSendDataTest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
2626
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
2727
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustry}}" userInput="Apps and Games" stepKey="selectAdvancedReportingIndustry"/>
28-
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingHour}}" userInput="11" stepKey="selectAdvancedReportingHour"/>
29-
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingMinute}}" userInput="11" stepKey="selectAdvancedReportingMinute"/>
30-
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingSeconds}}" userInput="00" stepKey="selectAdvancedReportingSeconds"/>
28+
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingHour}}" userInput="23" stepKey="selectAdvancedReportingHour"/>
29+
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingMinute}}" userInput="59" stepKey="selectAdvancedReportingMinute"/>
30+
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingSeconds}}" userInput="59" stepKey="selectAdvancedReportingSeconds"/>
3131
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveConfigButton"/>
3232
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccess"/>
3333
</test>

app/code/Magento/AsynchronousOperations/etc/adminhtml/system.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<label>Bulk Actions</label>
1414
<field id="lifetime" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
1515
<label>Days Saved in Log</label>
16+
<validate>validate-zero-or-greater validate-digits</validate>
1617
</field>
1718
</group>
1819
</section>

app/code/Magento/Authorization/Model/Role.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ public function __construct( //phpcs:ignore Generic.CodeAnalysis.UselessOverridi
5252

5353
/**
5454
* @inheritDoc
55+
*
56+
* @SuppressWarnings(PHPMD.SerializationAware)
57+
* @deprecated Do not use PHP serialization.
5558
*/
5659
public function __sleep()
5760
{
@@ -61,6 +64,9 @@ public function __sleep()
6164

6265
/**
6366
* @inheritDoc
67+
*
68+
* @SuppressWarnings(PHPMD.SerializationAware)
69+
* @deprecated Do not use PHP serialization.
6470
*/
6571
public function __wakeup()
6672
{
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,42 @@
1+
# Magento_Authorizenet module
2+
13
The Magento_Authorizenet module implements the integration with the Authorize.Net payment gateway and makes the latter available as a payment method in Magento.
4+
5+
## Extensibility
6+
7+
Extension developers can interact with the Magento_Authorizenet 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_Authorizenet module.
10+
11+
### Events
12+
13+
This module dispatches the following events:
14+
15+
- `checkout_directpost_placeOrder` event in the `\Magento\Authorizenet\Controller\Directpost\Payment\Place::placeCheckoutOrder()` method. Parameters:
16+
- `result` is a data object (`\Magento\Framework\DataObject` class).
17+
- `action` is a controller object (`\Magento\Authorizenet\Controller\Directpost\Payment\Place`).
18+
19+
- `order_cancel_after` event in the `\Magento\Authorizenet\Model\Directpost::declineOrder()` method. Parameters:
20+
- `order` is an order object (`\Magento\Sales\Model\Order` class).
21+
22+
23+
This module observes the following events:
24+
25+
- `checkout_submit_all_after` event in the `Magento\Authorizenet\Observer\SaveOrderAfterSubmitObserver` file.
26+
- `checkout_directpost_placeOrder` event in the `Magento\Authorizenet\Observer\AddFieldsToResponseObserver` file.
27+
28+
For information about events in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.3/extension-dev-guide/events-and-observers.html#events).
29+
30+
### Layouts
31+
32+
This module introduces the following layouts and layout handles in the `view/adminhtml/layout` directory:
33+
34+
- `adminhtml_authorizenet_directpost_payment_redirect`
35+
36+
This module introduces the following layouts and layout handles in the `view/frontend/layout` directory:
37+
38+
- `authorizenet_directpost_payment_backendresponse`
39+
- `authorizenet_directpost_payment_redirect`
40+
- `authorizenet_directpost_payment_response`
41+
42+
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).

app/code/Magento/AuthorizenetGraphQl/Model/AuthorizenetDataProvider.php

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
use Magento\QuoteGraphQl\Model\Cart\Payment\AdditionalDataProviderInterface;
1111
use Magento\Framework\Stdlib\ArrayManager;
12+
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
1213

1314
/**
1415
* SetPaymentMethod additional data provider model for Authorizenet payment method
@@ -36,10 +37,32 @@ public function __construct(
3637
*
3738
* @param array $data
3839
* @return array
40+
* @throws GraphQlInputException
3941
*/
4042
public function getData(array $data): array
4143
{
42-
$additionalData = $this->arrayManager->get(static::PATH_ADDITIONAL_DATA, $data) ?? [];
44+
if (!isset($data[self::PATH_ADDITIONAL_DATA])) {
45+
throw new GraphQlInputException(
46+
__('Required parameter "authorizenet_acceptjs" for "payment_method" is missing.')
47+
);
48+
}
49+
if (!isset($data[self::PATH_ADDITIONAL_DATA]['opaque_data_descriptor'])) {
50+
throw new GraphQlInputException(
51+
__('Required parameter "opaque_data_descriptor" for "authorizenet_acceptjs" is missing.')
52+
);
53+
}
54+
if (!isset($data[self::PATH_ADDITIONAL_DATA]['opaque_data_value'])) {
55+
throw new GraphQlInputException(
56+
__('Required parameter "opaque_data_value" for "authorizenet_acceptjs" is missing.')
57+
);
58+
}
59+
if (!isset($data[self::PATH_ADDITIONAL_DATA]['cc_last_4'])) {
60+
throw new GraphQlInputException(
61+
__('Required parameter "cc_last_4" for "authorizenet_acceptjs" is missing.')
62+
);
63+
}
64+
65+
$additionalData = $this->arrayManager->get(static::PATH_ADDITIONAL_DATA, $data);
4366
foreach ($additionalData as $key => $value) {
4467
$additionalData[$this->convertSnakeCaseToCamelCase($key)] = $value;
4568
unset($additionalData[$key]);

0 commit comments

Comments
 (0)