Skip to content

Commit 4e68337

Browse files
committed
Merge branch '2.2-develop' into #14020-Cart-Sales-Rule-with-negated-condition-over-special-price-does-not-work-for-configurable-products
# Conflicts: # app/code/Magento/SalesRule/Model/Rule/Condition/Product.php
2 parents 0c9aa81 + 31c3293 commit 4e68337

File tree

2,835 files changed

+33922
-12244
lines changed

Some content is hidden

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

2,835 files changed

+33922
-12244
lines changed

CHANGELOG.md

Lines changed: 144 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 1 deletion
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:[email protected]">[email protected]</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

Lines changed: 3 additions & 0 deletions
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.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "magento/functional-test-module-admin-notification",
3+
"description": "N/A",
4+
"config": {
5+
"sort-packages": true
6+
},
7+
"require": {
8+
"php": "~7.0.13|~7.1.0",
9+
"magento/functional-test-module-store": "100.0.0-dev",
10+
"magento/functional-test-module-backend": "100.0.0-dev",
11+
"magento/functional-test-module-media-storage": "100.0.0-dev",
12+
"magento/magento2-functional-testing-framework": "2.2.0",
13+
"magento/functional-test-module-ui": "100.0.0-dev"
14+
},
15+
"type": "magento2-test",
16+
"license": [
17+
"OSL-3.0",
18+
"AFL-3.0"
19+
]
20+
}

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

Lines changed: 6 additions & 0 deletions
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 3 additions & 0 deletions
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/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"lib-libxml": "*"
1212
},
1313
"type": "magento2-module",
14-
"version": "100.2.2",
14+
"version": "100.2.3",
1515
"license": [
1616
"OSL-3.0",
1717
"AFL-3.0"

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

Lines changed: 1 addition & 1 deletion
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
}
Lines changed: 8 additions & 6 deletions
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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ class AdvancedPricing extends \Magento\CatalogImportExport\Model\Export\Product
103103
* @param \Magento\CatalogImportExport\Model\Export\RowCustomizerInterface $rowCustomizer
104104
* @param ImportProduct\StoreResolver $storeResolver
105105
* @param \Magento\Customer\Api\GroupRepositoryInterface $groupRepository
106-
* @throws \Magento\Framework\Exception\LocalizedException
107106
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
108107
*/
109108
public function __construct(
@@ -192,6 +191,7 @@ protected function initTypeModels()
192191
* Export process
193192
*
194193
* @return string
194+
* @throws \Magento\Framework\Exception\LocalizedException
195195
*/
196196
public function export()
197197
{
@@ -461,6 +461,7 @@ protected function getTierPrices(array $productLinksIds, $table)
461461
*
462462
* @param int $websiteId
463463
* @return string
464+
* @throws \Magento\Framework\Exception\LocalizedException
464465
*/
465466
protected function _getWebsiteCode(int $websiteId): string
466467
{
@@ -491,6 +492,8 @@ protected function _getWebsiteCode(int $websiteId): string
491492
* @param int $customerGroupId
492493
* @param int $allGroups
493494
* @return string
495+
* @throws \Magento\Framework\Exception\LocalizedException
496+
* @throws \Magento\Framework\Exception\NoSuchEntityException
494497
*/
495498
protected function _getCustomerGroupById(
496499
int $customerGroupId,

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

Lines changed: 1 addition & 1 deletion
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
@@ -619,6 +618,7 @@ protected function processCountNewPrices(array $tierPrices)
619618
* Get product entity link field
620619
*
621620
* @return string
621+
* @throws \Exception
622622
*/
623623
private function getProductEntityLinkField()
624624
{

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

Lines changed: 1 addition & 0 deletions
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
{
Lines changed: 3 additions & 0 deletions
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.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "magento/functional-test-module-advanced-pricing-import-export",
3+
"description": "N/A",
4+
"config": {
5+
"sort-packages": true
6+
},
7+
"require": {
8+
"php": "~7.0.13|~7.1.0",
9+
"magento/functional-test-module-catalog": "100.0.0-dev",
10+
"magento/functional-test-module-catalog-inventory": "100.0.0-dev",
11+
"magento/functional-test-module-eav": "100.0.0-dev",
12+
"magento/functional-test-module-import-export": "100.0.0-dev",
13+
"magento/functional-test-module-catalog-import-export": "100.0.0-dev",
14+
"magento/functional-test-module-customer": "100.0.0-dev",
15+
"magento/functional-test-module-store": "100.0.0-dev",
16+
"magento/magento2-functional-testing-framework": "2.2.0"
17+
},
18+
"type": "magento2-test",
19+
"license": [
20+
"OSL-3.0",
21+
"AFL-3.0"
22+
]
23+
}

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ protected function setUp()
213213
'_getCustomerGroupById',
214214
'correctExportData'
215215
]);
216-
$this->advancedPricing = $this->getMockbuilder(
216+
$this->advancedPricing = $this->getMockBuilder(
217217
\Magento\AdvancedPricingImportExport\Model\Export\AdvancedPricing::class
218218
)
219219
->setMethods($mockMethods)
@@ -347,6 +347,7 @@ protected function tearDown()
347347
* @param $object
348348
* @param $property
349349
* @return mixed
350+
* @throws \ReflectionException
350351
*/
351352
protected function getPropertyValue($object, $property)
352353
{
@@ -362,6 +363,8 @@ protected function getPropertyValue($object, $property)
362363
* @param $object
363364
* @param $property
364365
* @param $value
366+
* @return mixed
367+
* @throws \ReflectionException
365368
*/
366369
protected function setPropertyValue(&$object, $property, $value)
367370
{

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

Lines changed: 8 additions & 0 deletions
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 3 additions & 0 deletions
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 [

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

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ public function testGetEntityTypeCode()
209209
* Test method validateRow against its result.
210210
*
211211
* @dataProvider validateRowResultDataProvider
212+
* @param array $rowData
213+
* @param string|null $behavior
214+
* @param bool $expectedResult
215+
* @throws \ReflectionException
212216
*/
213217
public function testValidateRowResult($rowData, $behavior, $expectedResult)
214218
{
@@ -234,6 +238,10 @@ public function testValidateRowResult($rowData, $behavior, $expectedResult)
234238
* Test method validateRow whether AddRowError is called.
235239
*
236240
* @dataProvider validateRowAddRowErrorCallDataProvider
241+
* @param array $rowData
242+
* @param string|null $behavior
243+
* @param string $error
244+
* @throws \ReflectionException
237245
*/
238246
public function testValidateRowAddRowErrorCall($rowData, $behavior, $error)
239247
{
@@ -324,6 +332,13 @@ public function testSaveAdvancedPricing()
324332
* Take into consideration different data and check relative internal calls.
325333
*
326334
* @dataProvider saveAndReplaceAdvancedPricesAppendBehaviourDataProvider
335+
* @param array $data
336+
* @param string $tierCustomerGroupId
337+
* @param string $groupCustomerGroupId
338+
* @param string $tierWebsiteId
339+
* @param string $groupWebsiteId
340+
* @param array $expectedTierPrices
341+
* @throws \ReflectionException
327342
*/
328343
public function testSaveAndReplaceAdvancedPricesAppendBehaviourDataAndCalls(
329344
$data,
@@ -768,6 +783,9 @@ public function testSaveProductPrices($priceData, $oldSkus, $priceIn, $callNum)
768783
$this->invokeMethod($this->advancedPricing, 'saveProductPrices', [$priceData, 'table']);
769784
}
770785

786+
/**
787+
* @return array
788+
*/
771789
public function saveProductPricesDataProvider()
772790
{
773791
return [
@@ -839,6 +857,9 @@ public function testDeleteProductTierPrices(
839857
);
840858
}
841859

860+
/**
861+
* @return array
862+
*/
842863
public function deleteProductTierPricesDataProvider()
843864
{
844865
return [
@@ -921,6 +942,9 @@ public function testProcessCountExistingPrices(
921942
$this->invokeMethod($this->advancedPricing, 'processCountExistingPrices', [$prices, 'table']);
922943
}
923944

945+
/**
946+
* @return array
947+
*/
924948
public function processCountExistingPricesDataProvider()
925949
{
926950
return [
@@ -947,6 +971,7 @@ public function processCountExistingPricesDataProvider()
947971
* @param $object
948972
* @param $property
949973
* @return mixed
974+
* @throws \ReflectionException
950975
*/
951976
protected function getPropertyValue($object, $property)
952977
{
@@ -963,6 +988,8 @@ protected function getPropertyValue($object, $property)
963988
* @param $object
964989
* @param $property
965990
* @param $value
991+
* @return mixed
992+
* @throws \ReflectionException
966993
*/
967994
protected function setPropertyValue(&$object, $property, $value)
968995
{
@@ -981,7 +1008,8 @@ protected function setPropertyValue(&$object, $property, $value)
9811008
* @param string $method
9821009
* @param array $args
9831010
*
984-
* @return mixed the method result.
1011+
* @return mixed
1012+
* @throws \ReflectionException
9851013
*/
9861014
private function invokeMethod($object, $method, $args = [])
9871015
{
@@ -998,6 +1026,7 @@ private function invokeMethod($object, $method, $args = [])
9981026
* @param array $methods
9991027
*
10001028
* @return \PHPUnit_Framework_MockObject_MockObject
1029+
* @throws \ReflectionException
10011030
*/
10021031
private function getAdvancedPricingMock($methods = [])
10031032
{

0 commit comments

Comments
 (0)