Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Commit

Permalink
Merge pull request #3 from Yogeshks/2.3-develop-PR-port-16354
Browse files Browse the repository at this point in the history
[Forwardport] Remove unnecessary translation of HTML tags
  • Loading branch information
yogeshks authored Aug 8, 2018
2 parents c0a6b4a + 656191d commit b4ae5d6
Show file tree
Hide file tree
Showing 4,156 changed files with 70,967 additions and 60,624 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
28 changes: 14 additions & 14 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
# Contributing to Magento 2 code

Contributions to the Magento 2 codebase are done using the fork & pull model.
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”).
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/).

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

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


## Contribution requirements

1. Contributions must adhere to [Magento coding standards](http://devdocs.magento.com/guides/v2.0/coding-standards/bk-coding-standards.html).
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.
3. Commits must be accompanied by meaningful commit messages.
4. PRs which include bug fixing, must be accompanied with step-by-step description of how to reproduce the bug.
1. Contributions must adhere to the [Magento coding standards](https://devdocs.magento.com/guides/v2.2/coding-standards/bk-coding-standards.html).
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.
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.
4. PRs which include bug fixes must be accompanied with a step-by-step description of how to reproduce the bug.
3. PRs which include new logic or new features must be submitted along with:
* Unit/integration test coverage (we will be releasing more information on writing test coverage in the near future).
* Proposed [documentation](http://devdocs.magento.com) update. Documentation contributions can be submitted [here](https://github.com/magento/devdocs).
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.
5. All automated tests are passed successfully (all builds on [Travis CI](https://travis-ci.org/magento/magento2) must be green).
* Unit/integration test coverage
* Proposed [documentation](http://devdocs.magento.com) updates. Documentation contributions can be submitted via the [devdocs GitHub](https://github.com/magento/devdocs).
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.
5. All automated tests must pass (all builds on [Travis CI](https://travis-ci.org/magento/magento2) must be green).

## Contribution process

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

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.
2. Review the [Contributor License Agreement](https://magento.com/legaldocuments/mca) if this is your first time contributing.
3. Create and test your work.
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).
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.
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).
5. Once your contribution is received the Magento 2 development team will review the contribution and collaborate with you as needed.

## Code of Conduct

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1977,7 +1977,7 @@ Tests:
* [#686](https://github.com/magento/magento2/issues/686) -- Product save validation errors in the admin don't hide the overlay
* [#702](https://github.com/magento/magento2/issues/702) -- Base table or view not found
* [#652](https://github.com/magento/magento2/issues/652) -- Multishipping checkout not to change the Billing address js issue
* [#648](https://github.com/magento/magento2/issues/648) -- An equal (=) sign in the hash of the product page to to break the tabs functionality
* [#648](https://github.com/magento/magento2/issues/648) -- An equal (=) sign in the hash of the product page to break the tabs functionality
* Service Contracts:
* Refactored usage of new API of the Customer module
* Implemented Service Contracts for the Sales module
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ To learn more about issue gate labels click [here](https://github.com/magento/ma

<h2>Reporting security issues</h2>

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

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

Expand Down
3 changes: 3 additions & 0 deletions app/code/Magento/AdminNotification/Test/Mftf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Admin Notification Functional Tests

The Functional Test Module for **Magento Admin Notification** module.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ public function testGetIdentity($expectedSum, $cacheTypes)
$this->assertEquals($expectedSum, $this->_messageModel->getIdentity());
}

/**
* @return array
*/
public function getIdentityDataProvider()
{
$cacheTypeMock1 = $this->createPartialMock(\stdClass::class, ['getCacheType']);
Expand Down Expand Up @@ -95,6 +98,9 @@ public function testIsDisplayed($expected, $allowed, $cacheTypes)
$this->assertEquals($expected, $this->_messageModel->isDisplayed());
}

/**
* @return array
*/
public function isDisplayedDataProvider()
{
$cacheTypesMock = $this->createPartialMock(\stdClass::class, ['getCacheType']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ public function testIsDisplayed($expectedFirstRun, $data)
$this->assertEquals($expectedFirstRun, $model->isDisplayed());
}

/**
* @return array
*/
public function isDisplayedDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ public function testIsDisplayed($expectedResult, $cached, $response)
$this->assertEquals($expectedResult, $this->_messageModel->isDisplayed());
}

/**
* @return array
*/
public function isDisplayedDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,12 @@
</ul>
</div>

<script>
require([
"jquery",
"Magento_Ui/js/modal/modal"
], function($){
if (this.modal) {
this.modal.html($('[data-role="system_messages_list"]').html());
} else {
this.modal = $('[data-role="system_messages_list"]').modal({
modalClass: 'modal-system-messages ui-popup-message',
type: 'popup',
buttons: []
});
<script type="text/x-magento-init">
{
"[data-role=system_messages_list]": {
"Magento_AdminNotification/js/system/messages/popup": {
"class":"modal-system-messages ui-popup-message"
}
}
}
this.modal.modal('openModal');
});
</script>
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

define([
'jquery',
'Magento_Ui/js/modal/modal'
], function ($, modal) {
'use strict';

return function (data, element) {

if (modal.modal) {
modal.modal.html($(element).html());
} else {
modal.modal = $(element).modal({
modalClass: data.class,
type: 'popup',
buttons: []
});
}

modal.modal.modal('openModal');
};
});
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ class AdvancedPricing extends \Magento\CatalogImportExport\Model\Export\Product
* @param \Magento\CatalogImportExport\Model\Export\RowCustomizerInterface $rowCustomizer
* @param ImportProduct\StoreResolver $storeResolver
* @param \Magento\Customer\Api\GroupRepositoryInterface $groupRepository
* @throws \Magento\Framework\Exception\LocalizedException
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
Expand Down Expand Up @@ -193,6 +192,7 @@ protected function initTypeModels()
* Export process
*
* @return string
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function export()
{
Expand Down Expand Up @@ -586,8 +586,8 @@ protected function getTierPrices(array $listSku, $table)
* Get Website code.
*
* @param int $websiteId
*
* @return string
* @throws \Magento\Framework\Exception\LocalizedException
*/
protected function _getWebsiteCode(int $websiteId): string
{
Expand Down Expand Up @@ -617,8 +617,9 @@ protected function _getWebsiteCode(int $websiteId): string
*
* @param int $groupId
* @param int $allGroups
*
* @return string
* @throws \Magento\Framework\Exception\LocalizedException
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
protected function _getCustomerGroupById(
int $groupId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Magento\CatalogImportExport\Model\Import\Product as ImportProduct;
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface;
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface;
use Magento\Framework\App\ResourceConnection;

/**
* Class AdvancedPricing
Expand Down Expand Up @@ -618,6 +617,7 @@ protected function processCountNewPrices(array $tierPrices)
* Get product entity link field
*
* @return string
* @throws \Exception
*/
private function getProductEntityLinkField()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function __construct($validators = [])
*
* @param array $value
* @return bool
* @throws \Zend_Validate_Exception
*/
public function isValid($value)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Advanced Pricing Import Export Functional Tests

The Functional Test Module for **Magento Advanced Pricing Import Export** module.
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,13 @@ protected function setUp()
]
);
$this->exportConfig = $this->createMock(\Magento\ImportExport\Model\Export\Config::class);
$this->productFactory = $this->createPartialMock(\Magento\Catalog\Model\ResourceModel\ProductFactory::class, [
$this->productFactory = $this->createPartialMock(
\Magento\Catalog\Model\ResourceModel\ProductFactory::class,
[
'create',
'getTypeId',
]);
]
);
$this->attrSetColFactory = $this->createPartialMock(
\Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory::class,
[
Expand Down Expand Up @@ -185,11 +188,14 @@ protected function setUp()
\Magento\CatalogImportExport\Model\Import\Product\StoreResolver::class
);
$this->groupRepository = $this->createMock(\Magento\Customer\Api\GroupRepositoryInterface::class);
$this->writer = $this->createPartialMock(\Magento\ImportExport\Model\Export\Adapter\AbstractAdapter::class, [
'setHeaderCols',
'writeRow',
'getContents',
]);
$this->writer = $this->createPartialMock(
\Magento\ImportExport\Model\Export\Adapter\AbstractAdapter::class,
[
'setHeaderCols',
'writeRow',
'getContents',
]
);
$constructorMethods = [
'initTypeModels',
'initAttributes',
Expand All @@ -213,7 +219,7 @@ protected function setUp()
'_getCustomerGroupById',
'correctExportData'
]);
$this->advancedPricing = $this->getMockbuilder(
$this->advancedPricing = $this->getMockBuilder(
\Magento\AdvancedPricingImportExport\Model\Export\AdvancedPricing::class
)
->setMethods($mockMethods)
Expand Down Expand Up @@ -347,6 +353,7 @@ protected function tearDown()
* @param $object
* @param $property
* @return mixed
* @throws \ReflectionException
*/
protected function getPropertyValue($object, $property)
{
Expand All @@ -362,6 +369,8 @@ protected function getPropertyValue($object, $property)
* @param $object
* @param $property
* @param $value
* @return mixed
* @throws \ReflectionException
*/
protected function setPropertyValue(&$object, $property, $value)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ public function testIsValidAddMessagesCall($value, $hasEmptyColumns, $customerGr
$this->tierPrice->isValid($value);
}

/**
* @return array
*/
public function isValidResultFalseDataProvider()
{
return [
Expand Down Expand Up @@ -286,6 +289,9 @@ public function isValidResultFalseDataProvider()
];
}

/**
* @return array
*/
public function isValidAddMessagesCallDataProvider()
{
return [
Expand Down Expand Up @@ -340,6 +346,7 @@ public function isValidAddMessagesCallDataProvider()
* @param object $object
* @param string $property
* @return mixed
* @throws \ReflectionException
*/
protected function getPropertyValue($object, $property)
{
Expand All @@ -357,6 +364,7 @@ protected function getPropertyValue($object, $property)
* @param string $property
* @param mixed $value
* @return object
* @throws \ReflectionException
*/
protected function setPropertyValue(&$object, $property, $value)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ public function testGetAllWebsitesValue()
$this->assertEquals($expectedResult, $result);
}

/**
* @return array
*/
public function isValidReturnDataProvider()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ public function testInit()
$this->validator->init(null);
}

/**
* @return array
*/
public function isValidDataProvider()
{
return [
Expand Down
Loading

0 comments on commit b4ae5d6

Please sign in to comment.