Skip to content

Commit 9b5b0a1

Browse files
committed
Merge branch '2.3-develop' into feature/271-Customer-Attributes-Validation
2 parents e177801 + 6a9860f commit 9b5b0a1

File tree

1,271 files changed

+39422
-6061
lines changed

Some content is hidden

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

1,271 files changed

+39422
-6061
lines changed

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4136,7 +4136,7 @@ Tests:
41364136
* Moved Multishipping functionality to newly created module Multishipping
41374137
* Extracted Product duplication behavior from Product model to Product\Copier model
41384138
* Replaced event "catalog_model_product_duplicate" with composite Product\Copier model
4139-
* Replaced event "catalog_product_prepare_save" with controller product initialization helper that can be customozed via plugins
4139+
* Replaced event "catalog_product_prepare_save" with controller product initialization helper that can be customized via plugins
41404140
* Consolidated Authorize.Net functionality in single module Authorizenet
41414141
* Eliminated dependency of Sales module on Shipping and Usa modules
41424142
* Eliminated dependency of Shipping module on Customer module
@@ -4335,7 +4335,7 @@ Tests:
43354335
* Fixed order placing with virtual product using Express Checkout
43364336
* Fixed the error during order placement with Recurring profile payment
43374337
* Fixed wrong redirect after customer registration during multishipping checkout
4338-
* Fixed inability to crate shipping labels
4338+
* Fixed inability to create shipping labels
43394339
* Fixed inability to switch language, if the default language is English
43404340
* Fixed an issue with incorrect XML appearing in cache after some actions on the frontend
43414341
* Fixed product export

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting-edge, feature-rich eCommerce solution that gets results.
77

88
## Magento System Requirements
9-
[Magento System Requirements](https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements2.html).
9+
[Magento System Requirements](https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements.html).
1010

1111
## Install Magento
1212

@@ -45,7 +45,7 @@ Please review the [Code Contributions guide](https://devdocs.magento.com/guides/
4545

4646
## Reporting Security Issues
4747

48-
To report security vulnerabilities in Magento software or web sites, please create a Bugcrowd researcher account [there](https://bugcrowd.com/magento) to submit and follow-up your issue. Learn more about reporting security issues [here](https://magento.com/security/reporting-magento-security-issue).
48+
To report security vulnerabilities or learn more about reporting security issues in Magento software or web sites visit the [Magento Bug Bounty Program](https://hackerone.com/magento) on hackerone. Please create a hackerone account [there](https://hackerone.com/magento) to submit and follow-up your issue.
4949

5050
Stay up-to-date on the latest security news and patches for Magento by signing up for [Security Alert Notifications](https://magento.com/security/sign-up).
5151

app/bootstrap.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
* Environment initialization
99
*/
1010
error_reporting(E_ALL);
11-
stream_wrapper_unregister('phar');
11+
if (in_array('phar', \stream_get_wrappers())) {
12+
stream_wrapper_unregister('phar');
13+
}
1214
#ini_set('display_errors', 1);
1315

1416
/* PHP version validation */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="AdminMenuSystem">
12+
<data key="pageTitle">System</data>
13+
<data key="title">Notifications</data>
14+
<data key="dataUiId">magento-backend-system</data>
15+
</entity>
16+
<entity name="AdminMenuSystemOtherSettingsNotifications">
17+
<data key="pageTitle">Notifications</data>
18+
<data key="title">Notifications</data>
19+
<data key="dataUiId">magento-adminnotification-system-adminnotification</data>
20+
</entity>
21+
</entities>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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="AdminSystemNotificationNavigateMenuTest">
12+
<annotations>
13+
<features value="AdminNotification"/>
14+
<stories value="Menu Navigation"/>
15+
<title value="Admin system notification navigate menu test"/>
16+
<description value="Admin should be able to navigate to System > Notifications"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-14125"/>
19+
<group value="menu"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/>
24+
</before>
25+
<after>
26+
<actionGroup ref="logout" stepKey="logout"/>
27+
</after>
28+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSystemNotificationPage">
29+
<argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/>
30+
<argument name="submenuUiId" value="{{AdminMenuSystemOtherSettingsNotifications.dataUiId}}"/>
31+
</actionGroup>
32+
<actionGroup ref="AdminAssertPageTitleActionGroup" stepKey="seePageTitle">
33+
<argument name="title" value="{{AdminMenuSystemOtherSettingsNotifications.pageTitle}}"/>
34+
</actionGroup>
35+
</test>
36+
</tests>

app/code/Magento/AdminNotification/view/adminhtml/layout/adminhtml_notification_block.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<block class="Magento\Backend\Block\Widget\Grid" name="adminhtml.notification.container.grid" as="grid">
1212
<arguments>
1313
<argument name="id" xsi:type="string">notificationGrid</argument>
14-
<argument name="dataSource" xsi:type="object">Magento\AdminNotification\Model\ResourceModel\Grid\Collection</argument>
14+
<argument name="dataSource" xsi:type="object" shared="false">Magento\AdminNotification\Model\ResourceModel\Grid\Collection</argument>
1515
<argument name="default_dir" xsi:type="string">DESC</argument>
1616
<argument name="default_sort" xsi:type="string">date_added</argument>
1717
<argument name="save_parameters_in_session" xsi:type="string">1</argument>

app/code/Magento/AdvancedSearch/view/adminhtml/layout/catalog_search_block.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<block class="Magento\AdvancedSearch\Block\Adminhtml\Search\Grid" name="search.edit.grid" as="grid">
1212
<arguments>
1313
<argument name="id" xsi:type="string">catalog_search_grid</argument>
14-
<argument name="dataSource" xsi:type="object">Magento\AdvancedSearch\Model\ResourceModel\Search\Grid\Collection</argument>
14+
<argument name="dataSource" xsi:type="object" shared="false">Magento\AdvancedSearch\Model\ResourceModel\Search\Grid\Collection</argument>
1515
<argument name="default_sort" xsi:type="string">name</argument>
1616
<argument name="default_dir" xsi:type="string">ASC</argument>
1717
<argument name="save_parameters_in_session" xsi:type="string">1</argument>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="AdminMenuReports">
12+
<data key="pageTitle">Reports</data>
13+
<data key="title">Reports</data>
14+
<data key="dataUiId">magento-reports-report</data>
15+
</entity>
16+
<entity name="AdminMenuReportsBusinessIntelligenceAdvancedReporting">
17+
<data key="pageTitle">AdvancedReporting</data>
18+
<data key="title">AdvancedReporting</data>
19+
<data key="dataUiId">magento-analytics-advanced-reporting</data>
20+
</entity>
21+
</entities>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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="AdminAdvancedReportingNavigateMenuTest">
12+
<annotations>
13+
<features value="Analytics"/>
14+
<stories value="Menu Navigation"/>
15+
<title value="Admin advanced reporting navigate menu test"/>
16+
<description value="Admin should be able to navigate through advanced reporting admin menu to BI reports page"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-14152"/>
19+
<group value="menu"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/>
24+
</before>
25+
<after>
26+
<actionGroup ref="logout" stepKey="logout"/>
27+
</after>
28+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateAdvancedReportingPage">
29+
<argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/>
30+
<argument name="submenuUiId" value="{{AdminMenuReportsBusinessIntelligenceAdvancedReporting.dataUiId}}"/>
31+
</actionGroup>
32+
<switchToNextTab stepKey="switchToNewTab"/>
33+
<seeInCurrentUrl url="advancedreporting.rjmetrics.com/report" stepKey="seeAssertAdvancedReportingPageUrl"/>
34+
</test>
35+
</tests>

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

+12-2
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,29 @@ public function __construct(
5151
}
5252

5353
/**
54-
* {@inheritdoc}
54+
* @inheritDoc
55+
*
56+
* @SuppressWarnings(PHPMD.SerializationAware)
57+
* @deprecated Do not use PHP serialization.
5558
*/
5659
public function __sleep()
5760
{
61+
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
62+
5863
$properties = parent::__sleep();
5964
return array_diff($properties, ['_resource', '_resourceCollection']);
6065
}
6166

6267
/**
63-
* {@inheritdoc}
68+
* @inheritDoc
69+
*
70+
* @SuppressWarnings(PHPMD.SerializationAware)
71+
* @deprecated Do not use PHP serialization.
6472
*/
6573
public function __wakeup()
6674
{
75+
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
76+
6777
parent::__wakeup();
6878
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
6979
$this->_resource = $objectManager->get(\Magento\Authorization\Model\ResourceModel\Role::class);

app/code/Magento/AuthorizenetAcceptjs/Gateway/Validator/TransactionResponseValidator.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ public function validate(array $validationSubject): ResultInterface
5454
if (isset($transactionResponse['messages']['message']['code'])) {
5555
$errorCodes[] = $transactionResponse['messages']['message']['code'];
5656
$errorMessages[] = $transactionResponse['messages']['message']['text'];
57-
} elseif ($transactionResponse['messages']['message']) {
57+
} elseif (isset($transactionResponse['messages']['message'])) {
5858
foreach ($transactionResponse['messages']['message'] as $message) {
5959
$errorCodes[] = $message['code'];
6060
$errorMessages[] = $message['description'];
6161
}
6262
} elseif (isset($transactionResponse['errors'])) {
6363
foreach ($transactionResponse['errors'] as $message) {
6464
$errorCodes[] = $message['errorCode'];
65-
$errorMessages[] = $message['errorCode'];
65+
$errorMessages[] = $message['errorText'];
6666
}
6767
}
6868

@@ -85,8 +85,10 @@ private function isResponseCodeAnError(array $transactionResponse): bool
8585
?? $transactionResponse['errors'][0]['errorCode']
8686
?? null;
8787

88-
return in_array($transactionResponse['responseCode'], [self::RESPONSE_CODE_APPROVED, self::RESPONSE_CODE_HELD])
89-
&& $code
88+
return !in_array($transactionResponse['responseCode'], [
89+
self::RESPONSE_CODE_APPROVED, self::RESPONSE_CODE_HELD
90+
])
91+
|| $code
9092
&& !in_array(
9193
$code,
9294
[

app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/Validator/TransactionResponseValidatorTest.php

+28-10
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@
1515
use PHPUnit\Framework\MockObject\MockObject;
1616
use PHPUnit\Framework\TestCase;
1717

18+
/**
19+
* Tests for the transaction response validator
20+
*/
1821
class TransactionResponseValidatorTest extends TestCase
1922
{
2023
private const RESPONSE_CODE_APPROVED = 1;
2124
private const RESPONSE_CODE_HELD = 4;
25+
private const RESPONSE_CODE_DENIED = 2;
2226
private const RESPONSE_REASON_CODE_APPROVED = 1;
2327
private const RESPONSE_REASON_CODE_PENDING_REVIEW_AUTHORIZED = 252;
2428
private const RESPONSE_REASON_CODE_PENDING_REVIEW = 253;
29+
private const ERROR_CODE_AVS_MISMATCH = 27;
2530

2631
/**
2732
* @var ResultInterfaceFactory|MockObject
@@ -86,16 +91,6 @@ public function testValidateScenarios($transactionResponse, $isValid, $errorCode
8691
public function scenarioProvider()
8792
{
8893
return [
89-
// This validator only cares about successful edge cases so test for default behavior
90-
[
91-
[
92-
'responseCode' => 'foo',
93-
],
94-
true,
95-
[],
96-
[]
97-
],
98-
9994
// Test for acceptable reason codes
10095
[
10196
[
@@ -208,6 +203,29 @@ public function scenarioProvider()
208203
['foo'],
209204
['bar']
210205
],
206+
[
207+
[
208+
'responseCode' => self::RESPONSE_CODE_DENIED,
209+
'errors' => [
210+
[
211+
'errorCode' => self::ERROR_CODE_AVS_MISMATCH,
212+
'errorText' => 'bar'
213+
]
214+
]
215+
],
216+
false,
217+
[self::ERROR_CODE_AVS_MISMATCH],
218+
['bar']
219+
],
220+
// This validator only cares about successful edge cases so test for default behavior
221+
[
222+
[
223+
'responseCode' => 'foo',
224+
],
225+
false,
226+
[],
227+
[]
228+
],
211229
];
212230
}
213231
}

0 commit comments

Comments
 (0)