Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit b4ae5d6

Browse files
authored
Merge pull request #3 from Yogeshks/2.3-develop-PR-port-16354
[Forwardport] Remove unnecessary translation of HTML tags
2 parents c0a6b4a + 656191d commit b4ae5d6

File tree

4,156 files changed

+70967
-60624
lines changed

Some content is hidden

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

4,156 files changed

+70967
-60624
lines changed

.github/CONTRIBUTING.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
# Contributing to Magento 2 code
22

33
Contributions to the Magento 2 codebase are done using the fork & pull model.
4-
This contribution model has contributors maintaining their own copy of the forked codebase (which can easily be synced with the main copy). The forked repository is then used to submit a request to the base repository to “pull” a set of changes (hence the phrase “pull request”).
4+
This contribution model has contributors maintaining their own copy of the forked codebase (which can easily be synced with the main copy). The forked repository is then used to submit a request to the base repository to “pull” a set of changes. For more information on pull requests please refer to [GitHub Help](https://help.github.com/articles/about-pull-requests/).
55

6-
Contributions can take the form of new components/features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes, optimizations or just good suggestions.
6+
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 or optimizations.
77

8-
The Magento 2 development team will review all issues and contributions submitted by the community of developers in the first in, first out order. During the review we might require clarifications from the contributor. If there is no response from the contributor for two weeks, the issue is closed.
8+
The Magento 2 development team will review all issues and contributions submitted by the community of developers in the first in, first out order. During the review we might require clarifications from the contributor. If there is no response from the contributor within two weeks, the pull request will be closed.
99

1010

1111
## Contribution requirements
1212

13-
1. Contributions must adhere to [Magento coding standards](http://devdocs.magento.com/guides/v2.0/coding-standards/bk-coding-standards.html).
14-
2. Pull requests (PRs) must be accompanied by a meaningful description of their purpose. Comprehensive descriptions increase the chances of a pull request to be merged quickly and without additional clarification requests.
15-
3. Commits must be accompanied by meaningful commit messages.
16-
4. PRs which include bug fixing, must be accompanied with step-by-step description of how to reproduce the bug.
13+
1. Contributions must adhere to the [Magento coding standards](https://devdocs.magento.com/guides/v2.2/coding-standards/bk-coding-standards.html).
14+
2. Pull requests (PRs) must be accompanied by a meaningful description of their purpose. Comprehensive descriptions increase the chances of a pull request being merged quickly and without additional clarification requests.
15+
3. Commits must be accompanied by meaningful commit messages. Please see the [Magento Pull Request Template](https://github.com/magento/magento2/blob/2.2-develop/.github/PULL_REQUEST_TEMPLATE.md) for more information.
16+
4. PRs which include bug fixes must be accompanied with a step-by-step description of how to reproduce the bug.
1717
3. PRs which include new logic or new features must be submitted along with:
18-
* Unit/integration test coverage (we will be releasing more information on writing test coverage in the near future).
19-
* Proposed [documentation](http://devdocs.magento.com) update. Documentation contributions can be submitted [here](https://github.com/magento/devdocs).
20-
4. For large features or changes, please [open an issue](https://github.com/magento/magento2/issues) and discuss first. This may prevent duplicate or unnecessary effort, and it may gain you some additional contributors.
21-
5. All automated tests are passed successfully (all builds on [Travis CI](https://travis-ci.org/magento/magento2) must be green).
18+
* Unit/integration test coverage
19+
* Proposed [documentation](http://devdocs.magento.com) updates. Documentation contributions can be submitted via the [devdocs GitHub](https://github.com/magento/devdocs).
20+
4. For larger features or changes, please [open an issue](https://github.com/magento/magento2/issues) to discuss the proposed changes prior to development. This may prevent duplicate or unnecessary effort and allow other contributors to provide input.
21+
5. All automated tests must pass (all builds on [Travis CI](https://travis-ci.org/magento/magento2) must be green).
2222

2323
## Contribution process
2424

25-
If you are a new GitHub user, we recommend that you create your own [free github account](https://github.com/signup/free). By doing that, you will be able to collaborate with the Magento 2 development team, fork the Magento 2 project and be able to easily send pull requests.
25+
If you are a new GitHub user, we recommend that you create your own [free github account](https://github.com/signup/free). This will allow you to collaborate with the Magento 2 development team, fork the Magento 2 project and send pull requests.
2626

2727
1. Search current [listed issues](https://github.com/magento/magento2/issues) (open or closed) for similar proposals of intended contribution before starting work on a new contribution.
2828
2. Review the [Contributor License Agreement](https://magento.com/legaldocuments/mca) if this is your first time contributing.
2929
3. Create and test your work.
30-
4. Fork the Magento 2 repository according to [Fork a repository instructions](http://devdocs.magento.com/guides/v2.0/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow [Create a pull request instructions](http://devdocs.magento.com/guides/v2.0/contributor-guide/contributing.html#pull_request).
31-
5. Once your contribution is received, Magento 2 development team will review the contribution and collaborate with you as needed to improve the quality of the contribution.
30+
4. Fork the Magento 2 repository according to the [Fork A Repository instructions](http://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow the [Create A Pull Request instructions](http://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#pull_request).
31+
5. Once your contribution is received the Magento 2 development team will review the contribution and collaborate with you as needed.
3232

3333
## Code of Conduct
3434

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
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

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.

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/view/adminhtml/templates/system/messages/popup.phtml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,12 @@
1919
</ul>
2020
</div>
2121

22-
<script>
23-
require([
24-
"jquery",
25-
"Magento_Ui/js/modal/modal"
26-
], function($){
27-
if (this.modal) {
28-
this.modal.html($('[data-role="system_messages_list"]').html());
29-
} else {
30-
this.modal = $('[data-role="system_messages_list"]').modal({
31-
modalClass: 'modal-system-messages ui-popup-message',
32-
type: 'popup',
33-
buttons: []
34-
});
22+
<script type="text/x-magento-init">
23+
{
24+
"[data-role=system_messages_list]": {
25+
"Magento_AdminNotification/js/system/messages/popup": {
26+
"class":"modal-system-messages ui-popup-message"
27+
}
28+
}
3529
}
36-
this.modal.modal('openModal');
37-
});
38-
</script>
30+
</script>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
define([
7+
'jquery',
8+
'Magento_Ui/js/modal/modal'
9+
], function ($, modal) {
10+
'use strict';
11+
12+
return function (data, element) {
13+
14+
if (modal.modal) {
15+
modal.modal.html($(element).html());
16+
} else {
17+
modal.modal = $(element).modal({
18+
modalClass: data.class,
19+
type: 'popup',
20+
buttons: []
21+
});
22+
}
23+
24+
modal.modal.modal('openModal');
25+
};
26+
});

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

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

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
@@ -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

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.

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

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

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 [

0 commit comments

Comments
 (0)