Skip to content

Commit 3af924b

Browse files
author
Valeriy Nayda
committed
Merge remote-tracking branch 'origin/2.3-develop' into 87-Fetch-attribute-values-and-labels-for-customAttributeMetadata
2 parents 4aa808e + 9b01481 commit 3af924b

File tree

3,862 files changed

+55604
-28563
lines changed

Some content is hidden

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

3,862 files changed

+55604
-28563
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1977,7 +1977,7 @@ Tests:
19771977
* [#686](https://github.com/magento/magento2/issues/686) -- Product save validation errors in the admin don't hide the overlay
19781978
* [#702](https://github.com/magento/magento2/issues/702) -- Base table or view not found
19791979
* [#652](https://github.com/magento/magento2/issues/652) -- Multishipping checkout not to change the Billing address js issue
1980-
* [#648](https://github.com/magento/magento2/issues/648) -- An equal (=) sign in the hash of the product page to to break the tabs functionality
1980+
* [#648](https://github.com/magento/magento2/issues/648) -- An equal (=) sign in the hash of the product page to break the tabs functionality
19811981
* Service Contracts:
19821982
* Refactored usage of new API of the Customer module
19831983
* Implemented Service Contracts for the Sales module

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ To learn more about issue gate labels click [here](https://github.com/magento/ma
5858

5959
<h2>Reporting security issues</h2>
6060

61-
To report security vulnerabilities in Magento software or web sites, please e-mail <a href="mailto:security@magento.com">security@magento.com</a>. Please do not report security issues using GitHub. Be sure to encrypt your e-mail with our <a href="https://info2.magento.com/rs/magentoenterprise/images/security_at_magento.asc">encryption key</a> if it includes sensitive information. Learn more about reporting security issues <a href="https://magento.com/security/reporting-magento-security-issue">here</a>.
61+
To report security vulnerabilities in Magento software or web sites, please create a Bugcrowd researcher account <a href="https://bugcrowd.com/magento">there</a> to submit and follow-up your issue. Learn more about reporting security issues <a href="https://magento.com/security/reporting-magento-security-issue">here</a>.
6262

6363
Stay up-to-date on the latest security news and patches for Magento by signing up for <a href="https://magento.com/security/sign-up">Security Alert Notifications</a>.
6464

app/bootstrap.php

+10-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,16 @@
5454
&& isset($_SERVER['HTTP_ACCEPT'])
5555
&& strpos($_SERVER['HTTP_ACCEPT'], 'text/html') !== false
5656
) {
57-
\Magento\Framework\Profiler::applyConfig(
58-
(isset($_SERVER['MAGE_PROFILER']) && strlen($_SERVER['MAGE_PROFILER'])) ? $_SERVER['MAGE_PROFILER'] : trim(file_get_contents(BP . '/var/profiler.flag')),
57+
$profilerConfig = isset($_SERVER['MAGE_PROFILER']) && strlen($_SERVER['MAGE_PROFILER'])
58+
? $_SERVER['MAGE_PROFILER']
59+
: trim(file_get_contents(BP . '/var/profiler.flag'));
60+
61+
if ($profilerConfig) {
62+
$profilerConfig = json_decode($profilerConfig, true) ?: $profilerConfig;
63+
}
64+
65+
Magento\Framework\Profiler::applyConfig(
66+
$profilerConfig,
5967
BP,
6068
!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'
6169
);

app/code/Magento/AdminNotification/Observer/PredispatchAdminActionControllerObserver.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(
3737
}
3838

3939
/**
40-
* Predispath admin action controller
40+
* Predispatch admin action controller
4141
*
4242
* @param \Magento\Framework\Event\Observer $observer
4343
* @return void
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Admin Notification Functional Tests
2+
3+
The Functional Test Module for **Magento Admin Notification** module.

app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/CacheOutdatedTest.php

+6
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ public function testGetIdentity($expectedSum, $cacheTypes)
6262
$this->assertEquals($expectedSum, $this->_messageModel->getIdentity());
6363
}
6464

65+
/**
66+
* @return array
67+
*/
6568
public function getIdentityDataProvider()
6669
{
6770
$cacheTypeMock1 = $this->createPartialMock(\stdClass::class, ['getCacheType']);
@@ -95,6 +98,9 @@ public function testIsDisplayed($expected, $allowed, $cacheTypes)
9598
$this->assertEquals($expected, $this->_messageModel->isDisplayed());
9699
}
97100

101+
/**
102+
* @return array
103+
*/
98104
public function isDisplayedDataProvider()
99105
{
100106
$cacheTypesMock = $this->createPartialMock(\stdClass::class, ['getCacheType']);

app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/Media/Synchronization/ErrorTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ public function testIsDisplayed($expectedFirstRun, $data)
7272
$this->assertEquals($expectedFirstRun, $model->isDisplayed());
7373
}
7474

75+
/**
76+
* @return array
77+
*/
7578
public function isDisplayedDataProvider()
7679
{
7780
return [

app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/SecurityTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ public function testIsDisplayed($expectedResult, $cached, $response)
7676
$this->assertEquals($expectedResult, $this->_messageModel->isDisplayed());
7777
}
7878

79+
/**
80+
* @return array
81+
*/
7982
public function isDisplayedDataProvider()
8083
{
8184
return [

app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{
2424
"[data-role=system_messages_list]": {
2525
"Magento_AdminNotification/js/system/messages/popup": {
26-
class: 'modal-system-messages ui-popup-message'
26+
"class":"modal-system-messages ui-popup-message"
2727
}
2828
}
2929
}
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
/**
22
* Copyright © Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
4-
*/
4+
*/
55

66
define([
77
'jquery',
88
'Magento_Ui/js/modal/modal'
9-
], function ($) {
9+
], function ($, modal) {
1010
'use strict';
1111

1212
return function (data, element) {
13-
if (this.modal) {
14-
this.modal.html($(element).html());
13+
14+
if (modal.modal) {
15+
modal.modal.html($(element).html());
1516
} else {
16-
this.modal = $(element).modal({
17+
modal.modal = $(element).modal({
1718
modalClass: data.class,
1819
type: 'popup',
1920
buttons: []
2021
});
2122
}
22-
this.modal.modal('openModal');
23+
24+
modal.modal.modal('openModal');
2325
};
2426
});

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ class AdvancedPricing extends \Magento\CatalogImportExport\Model\Export\Product
104104
* @param \Magento\CatalogImportExport\Model\Export\RowCustomizerInterface $rowCustomizer
105105
* @param ImportProduct\StoreResolver $storeResolver
106106
* @param \Magento\Customer\Api\GroupRepositoryInterface $groupRepository
107-
* @throws \Magento\Framework\Exception\LocalizedException
108107
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
109108
*/
110109
public function __construct(
@@ -193,6 +192,7 @@ protected function initTypeModels()
193192
* Export process
194193
*
195194
* @return string
195+
* @throws \Magento\Framework\Exception\LocalizedException
196196
*/
197197
public function export()
198198
{
@@ -586,8 +586,8 @@ protected function getTierPrices(array $listSku, $table)
586586
* Get Website code.
587587
*
588588
* @param int $websiteId
589-
*
590589
* @return string
590+
* @throws \Magento\Framework\Exception\LocalizedException
591591
*/
592592
protected function _getWebsiteCode(int $websiteId): string
593593
{
@@ -617,8 +617,9 @@ protected function _getWebsiteCode(int $websiteId): string
617617
*
618618
* @param int $groupId
619619
* @param int $allGroups
620-
*
621620
* @return string
621+
* @throws \Magento\Framework\Exception\LocalizedException
622+
* @throws \Magento\Framework\Exception\NoSuchEntityException
622623
*/
623624
protected function _getCustomerGroupById(
624625
int $groupId,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Magento\CatalogImportExport\Model\Import\Product as ImportProduct;
99
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface;
1010
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface;
11-
use Magento\Framework\App\ResourceConnection;
1211

1312
/**
1413
* Class AdvancedPricing
@@ -618,6 +617,7 @@ protected function processCountNewPrices(array $tierPrices)
618617
* Get product entity link field
619618
*
620619
* @return string
620+
* @throws \Exception
621621
*/
622622
private function getProductEntityLinkField()
623623
{

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing/Validator.php

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public function __construct($validators = [])
2828
*
2929
* @param array $value
3030
* @return bool
31+
* @throws \Zend_Validate_Exception
3132
*/
3233
public function isValid($value)
3334
{
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Advanced Pricing Import Export Functional Tests
2+
3+
The Functional Test Module for **Magento Advanced Pricing Import Export** module.

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Export/AdvancedPricingTest.php

+17-8
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,13 @@ protected function setUp()
151151
]
152152
);
153153
$this->exportConfig = $this->createMock(\Magento\ImportExport\Model\Export\Config::class);
154-
$this->productFactory = $this->createPartialMock(\Magento\Catalog\Model\ResourceModel\ProductFactory::class, [
154+
$this->productFactory = $this->createPartialMock(
155+
\Magento\Catalog\Model\ResourceModel\ProductFactory::class,
156+
[
155157
'create',
156158
'getTypeId',
157-
]);
159+
]
160+
);
158161
$this->attrSetColFactory = $this->createPartialMock(
159162
\Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory::class,
160163
[
@@ -185,11 +188,14 @@ protected function setUp()
185188
\Magento\CatalogImportExport\Model\Import\Product\StoreResolver::class
186189
);
187190
$this->groupRepository = $this->createMock(\Magento\Customer\Api\GroupRepositoryInterface::class);
188-
$this->writer = $this->createPartialMock(\Magento\ImportExport\Model\Export\Adapter\AbstractAdapter::class, [
189-
'setHeaderCols',
190-
'writeRow',
191-
'getContents',
192-
]);
191+
$this->writer = $this->createPartialMock(
192+
\Magento\ImportExport\Model\Export\Adapter\AbstractAdapter::class,
193+
[
194+
'setHeaderCols',
195+
'writeRow',
196+
'getContents',
197+
]
198+
);
193199
$constructorMethods = [
194200
'initTypeModels',
195201
'initAttributes',
@@ -213,7 +219,7 @@ protected function setUp()
213219
'_getCustomerGroupById',
214220
'correctExportData'
215221
]);
216-
$this->advancedPricing = $this->getMockbuilder(
222+
$this->advancedPricing = $this->getMockBuilder(
217223
\Magento\AdvancedPricingImportExport\Model\Export\AdvancedPricing::class
218224
)
219225
->setMethods($mockMethods)
@@ -347,6 +353,7 @@ protected function tearDown()
347353
* @param $object
348354
* @param $property
349355
* @return mixed
356+
* @throws \ReflectionException
350357
*/
351358
protected function getPropertyValue($object, $property)
352359
{
@@ -362,6 +369,8 @@ protected function getPropertyValue($object, $property)
362369
* @param $object
363370
* @param $property
364371
* @param $value
372+
* @return mixed
373+
* @throws \ReflectionException
365374
*/
366375
protected function setPropertyValue(&$object, $property, $value)
367376
{

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/TierPriceTest.php

+8
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ public function testIsValidAddMessagesCall($value, $hasEmptyColumns, $customerGr
181181
$this->tierPrice->isValid($value);
182182
}
183183

184+
/**
185+
* @return array
186+
*/
184187
public function isValidResultFalseDataProvider()
185188
{
186189
return [
@@ -286,6 +289,9 @@ public function isValidResultFalseDataProvider()
286289
];
287290
}
288291

292+
/**
293+
* @return array
294+
*/
289295
public function isValidAddMessagesCallDataProvider()
290296
{
291297
return [
@@ -340,6 +346,7 @@ public function isValidAddMessagesCallDataProvider()
340346
* @param object $object
341347
* @param string $property
342348
* @return mixed
349+
* @throws \ReflectionException
343350
*/
344351
protected function getPropertyValue($object, $property)
345352
{
@@ -357,6 +364,7 @@ protected function getPropertyValue($object, $property)
357364
* @param string $property
358365
* @param mixed $value
359366
* @return object
367+
* @throws \ReflectionException
360368
*/
361369
protected function setPropertyValue(&$object, $property, $value)
362370
{

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ public function testGetAllWebsitesValue()
114114
$this->assertEquals($expectedResult, $result);
115115
}
116116

117+
/**
118+
* @return array
119+
*/
117120
public function isValidReturnDataProvider()
118121
{
119122
return [

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/ValidatorTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ public function testInit()
7777
$this->validator->init(null);
7878
}
7979

80+
/**
81+
* @return array
82+
*/
8083
public function isValidDataProvider()
8184
{
8285
return [

0 commit comments

Comments
 (0)