Skip to content

Commit ee9a2be

Browse files
committed
Merge remote-tracking branch 'mainline/2.3-develop' into 2.3-develop
2 parents 82e51ca + 6b69fa1 commit ee9a2be

File tree

272 files changed

+3925
-1007
lines changed

Some content is hidden

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

272 files changed

+3925
-1007
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The Magento 2 development team will review all issues and contributions submitte
1616
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:
1818
* 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).
19+
* Proposed [documentation](https://devdocs.magento.com) updates. Documentation contributions can be submitted via the [devdocs GitHub](https://github.com/magento/devdocs).
2020
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.
2121
5. All automated tests must pass (all builds on [Travis CI](https://travis-ci.org/magento/magento2) must be green).
2222

@@ -27,7 +27,7 @@ If you are a new GitHub user, we recommend that you create your own [free github
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 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).
30+
4. Fork the Magento 2 repository according to the [Fork A Repository instructions](https://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](https://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#pull_request).
3131
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

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ To get detailed information about changes in Magento 2.3.0, see the [Release Not
44

55
2.1.0
66
=============
7-
To get detailed information about changes in Magento 2.1.0, please visit [Magento Community Edition (CE) Release Notes](http://devdocs.magento.com/guides/v2.1/release-notes/ReleaseNotes2.1.0CE.html "Magento Community Edition (CE) Release Notes")
7+
To get detailed information about changes in Magento 2.1.0, please visit [Magento Community Edition (CE) Release Notes](https://devdocs.magento.com/guides/v2.1/release-notes/ReleaseNotes2.1.0CE.html "Magento Community Edition (CE) Release Notes")
88

99
2.0.0
1010
=============
@@ -1025,7 +1025,7 @@ Tests:
10251025
* Improved backend menu keyboard accessibility
10261026
* Accessibility improvements: WAI-ARIA in a product item on a category page and related products
10271027
* Checkout flow code can work with a separate DB storage
1028-
* <a href="http://devdocs.magento.com/guides/v1.0/release-notes/changes.html#change-devrc-unit">Unit tests moved to module directories</a>
1028+
* <a href="https://devdocs.magento.com/guides/v1.0/release-notes/changes.html#change-devrc-unit">Unit tests moved to module directories</a>
10291029
* Addressed naming inconsistencies in REST routes
10301030
* Added Advanced Developer workflow for frontend developers
10311031
* Setup

app/code/Magento/Analytics/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Magento_Analytics Module
22

3-
The Magento_Analytics module integrates your Magento instance with the [Magento Business Intelligence (MBI)](https://magento.com/products/business-intelligence) to use [Advanced Reporting](http://devdocs.magento.com/guides/v2.2/advanced-reporting/modules.html) functionality.
3+
The Magento_Analytics module integrates your Magento instance with the [Magento Business Intelligence (MBI)](https://magento.com/products/business-intelligence) to use [Advanced Reporting](https://devdocs.magento.com/guides/v2.2/advanced-reporting/modules.html) functionality.
44

55
The module implements the following functionality:
66

@@ -16,8 +16,8 @@ The module implements the following functionality:
1616

1717
## Structure
1818

19-
Beyond the [usual module file structure](http://devdocs.magento.com/guides/v2.2/architecture/archi_perspectives/components/modules/mod_intro.html) the module contains a directory `ReportXml`.
20-
[Report XML](http://devdocs.magento.com/guides/v2.2/advanced-reporting/report-xml.html) is a markup language used to build reports for Advanced Reporting.
19+
Beyond the [usual module file structure](https://devdocs.magento.com/guides/v2.2/architecture/archi_perspectives/components/modules/mod_intro.html) the module contains a directory `ReportXml`.
20+
[Report XML](https://devdocs.magento.com/guides/v2.2/advanced-reporting/report-xml.html) is a markup language used to build reports for Advanced Reporting.
2121
The language declares SQL queries using XML declaration.
2222

2323
## Subscription Process

app/code/Magento/Authorizenet/etc/config.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<cgi_url_td_test_mode>https://apitest.authorize.net/xml/v1/request.api</cgi_url_td_test_mode>
3434
<cgi_url_td>https://api2.authorize.net/xml/v1/request.api</cgi_url_td>
3535
<paymentInfoKeys>x_card_type,x_account_number,x_avs_code,x_auth_code,x_response_reason_text,x_cvv2_resp_code</paymentInfoKeys>
36+
<group>authorizenet</group>
3637
</authorizenet_directpost>
3738
</payment>
3839
</default>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<payment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Payment:etc/payment.xsd">
10+
<groups>
11+
<group id="authorizenet">
12+
<label>Authorize.net</label>
13+
</group>
14+
</groups>
15+
</payment>

app/code/Magento/Backend/Model/Search/Customer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function load()
8989

9090
$this->searchCriteriaBuilder->setCurrentPage($this->getStart());
9191
$this->searchCriteriaBuilder->setPageSize($this->getLimit());
92-
$searchFields = ['firstname', 'lastname', 'company'];
92+
$searchFields = ['firstname', 'lastname', 'billing_company'];
9393
$filters = [];
9494
foreach ($searchFields as $field) {
9595
$filters[] = $this->filterBuilder
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminSlideOutDialogSection">
12+
<element name="closeButton" type="button" selector=".modal-slide._show [data-role='closeBtn']" timeout="30"/>
13+
<element name="cancelButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Cancel']" timeout="30"/>
14+
<element name="doneButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Done']" timeout="30"/>
15+
<element name="saveButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Save']" timeout="30"/>
16+
</section>
17+
</sections>

app/code/Magento/Braintree/etc/config.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<paymentInfoKeys>cc_type,cc_number,avsPostalCodeResponseCode,avsStreetAddressResponseCode,cvvResponseCode,processorAuthorizationCode,processorResponseCode,processorResponseText,liabilityShifted,liabilityShiftPossible,riskDataId,riskDataDecision</paymentInfoKeys>
4343
<avs_ems_adapter>Magento\Braintree\Model\AvsEmsCodeMapper</avs_ems_adapter>
4444
<cvv_ems_adapter>Magento\Braintree\Model\CvvEmsCodeMapper</cvv_ems_adapter>
45+
<group>braintree</group>
4546
</braintree>
4647
<braintree_paypal>
4748
<model>BraintreePayPalFacade</model>
@@ -67,6 +68,7 @@
6768
<privateInfoKeys>processorResponseCode,processorResponseText,paymentId</privateInfoKeys>
6869
<paymentInfoKeys>processorResponseCode,processorResponseText,paymentId,payerEmail</paymentInfoKeys>
6970
<supported_locales>en_US,en_GB,en_AU,da_DK,fr_FR,fr_CA,de_DE,zh_HK,it_IT,nl_NL,no_NO,pl_PL,es_ES,sv_SE,tr_TR,pt_BR,ja_JP,id_ID,ko_KR,pt_PT,ru_RU,th_TH,zh_CN,zh_TW</supported_locales>
71+
<group>braintree</group>
7072
</braintree_paypal>
7173
<braintree_cc_vault>
7274
<model>BraintreeCreditCardVaultFacade</model>
@@ -76,6 +78,7 @@
7678
<tokenFormat>Magento\Braintree\Model\InstantPurchase\CreditCard\TokenFormatter</tokenFormat>
7779
<additionalInformation>Magento\Braintree\Model\InstantPurchase\PaymentAdditionalInformationProvider</additionalInformation>
7880
</instant_purchase>
81+
<group>braintree</group>
7982
</braintree_cc_vault>
8083
<braintree_paypal_vault>
8184
<model>BraintreePayPalVaultFacade</model>
@@ -85,6 +88,7 @@
8588
<tokenFormat>Magento\Braintree\Model\InstantPurchase\PayPal\TokenFormatter</tokenFormat>
8689
<additionalInformation>Magento\Braintree\Model\InstantPurchase\PaymentAdditionalInformationProvider</additionalInformation>
8790
</instant_purchase>
91+
<group>braintree</group>
8892
</braintree_paypal_vault>
8993
</payment>
9094
</default>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<payment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Payment:etc/payment.xsd">
10+
<groups>
11+
<group id="braintree">
12+
<label>Braintree</label>
13+
</group>
14+
</groups>
15+
</payment>

app/code/Magento/Bundle/Model/Product/SaveHandler.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public function __construct(
5858
}
5959

6060
/**
61+
* Perform action on Bundle product relation/extension attribute
62+
*
6163
* @param object $entity
6264
* @param array $arguments
6365
*
@@ -83,7 +85,7 @@ public function execute($entity, $arguments = [])
8385
: [];
8486

8587
if (!$entity->getCopyFromView()) {
86-
$this->processRemovedOptions($entity->getSku(), $existingOptionsIds, $optionIds);
88+
$this->processRemovedOptions($entity, $existingOptionsIds, $optionIds);
8789
$newOptionsIds = array_diff($optionIds, $existingOptionsIds);
8890
$this->saveOptions($entity, $bundleProductOptions, $newOptionsIds);
8991
} else {
@@ -96,6 +98,8 @@ public function execute($entity, $arguments = [])
9698
}
9799

98100
/**
101+
* Remove option product links
102+
*
99103
* @param string $entitySku
100104
* @param \Magento\Bundle\Api\Data\OptionInterface $option
101105
* @return void
@@ -154,16 +158,19 @@ private function getOptionIds(array $options): array
154158
/**
155159
* Removes old options that no longer exists.
156160
*
157-
* @param string $entitySku
161+
* @param ProductInterface $entity
158162
* @param array $existingOptionsIds
159163
* @param array $optionIds
160164
* @return void
161165
*/
162-
private function processRemovedOptions(string $entitySku, array $existingOptionsIds, array $optionIds): void
166+
private function processRemovedOptions(ProductInterface $entity, array $existingOptionsIds, array $optionIds): void
163167
{
168+
$metadata = $this->metadataPool->getMetadata(ProductInterface::class);
169+
$parentId = $entity->getData($metadata->getLinkField());
164170
foreach (array_diff($existingOptionsIds, $optionIds) as $optionId) {
165-
$option = $this->optionRepository->get($entitySku, $optionId);
166-
$this->removeOptionLinks($entitySku, $option);
171+
$option = $this->optionRepository->get($entity->getSku(), $optionId);
172+
$option->setParentId($parentId);
173+
$this->removeOptionLinks($entity->getSku(), $option);
167174
$this->optionRepository->delete($option);
168175
}
169176
}

app/code/Magento/Catalog/Api/CategoryLinkRepositoryInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,20 @@ public function save(\Magento\Catalog\Api\Data\CategoryProductLinkInterface $pro
3232
*
3333
* @throws \Magento\Framework\Exception\CouldNotSaveException
3434
* @throws \Magento\Framework\Exception\StateException
35+
* @throws \Magento\Framework\Exception\InputException
3536
*/
3637
public function delete(\Magento\Catalog\Api\Data\CategoryProductLinkInterface $productLink);
3738

3839
/**
3940
* Remove the product assignment from the category by category id and sku
4041
*
41-
* @param string $sku
42+
* @param string $categoryId
4243
* @param string $sku
4344
* @return bool will returned True if products successfully deleted
4445
*
4546
* @throws \Magento\Framework\Exception\CouldNotSaveException
4647
* @throws \Magento\Framework\Exception\StateException
48+
* @throws \Magento\Framework\Exception\InputException
4749
*/
4850
public function deleteByIds($categoryId, $sku);
4951
}

app/code/Magento/Catalog/Model/Indexer/Product/Flat/FlatTableBuilder.php

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
use Magento\Framework\EntityManager\MetadataPool;
1111

1212
/**
13-
* Class FlatTableBuilder
13+
* Class for building flat index
14+
*
1415
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1516
*/
1617
class FlatTableBuilder
@@ -346,12 +347,21 @@ protected function _updateTemporaryTableByStoreValues(
346347
}
347348

348349
//Update not simple attributes (eg. dropdown)
349-
if (isset($flatColumns[$attributeCode . $valueFieldSuffix])) {
350-
$select = $this->_connection->select()->joinInner(
351-
['t' => $this->_productIndexerHelper->getTable('eav_attribute_option_value')],
352-
't.option_id = et.' . $attributeCode . ' AND t.store_id=' . $storeId,
353-
[$attributeCode . $valueFieldSuffix => 't.value']
354-
);
350+
$columnName = $attributeCode . $valueFieldSuffix;
351+
if (isset($flatColumns[$columnName])) {
352+
$columnValue = $this->_connection->getIfNullSql('ts.value', 't0.value');
353+
$select = $this->_connection->select();
354+
$select->joinLeft(
355+
['t0' => $this->_productIndexerHelper->getTable('eav_attribute_option_value')],
356+
't0.option_id = et.' . $attributeCode . ' AND t0.store_id = 0',
357+
[]
358+
)->joinLeft(
359+
['ts' => $this->_productIndexerHelper->getTable('eav_attribute_option_value')],
360+
'ts.option_id = et.' . $attributeCode . ' AND ts.store_id = ' . $storeId,
361+
[]
362+
)->columns(
363+
[$columnName => $columnValue]
364+
)->where($columnValue . ' IS NOT NULL');
355365
if (!empty($changedIds)) {
356366
$select->where($this->_connection->quoteInto('et.entity_id IN (?)', $changedIds));
357367
}
@@ -374,6 +384,8 @@ protected function _getTemporaryTableName($tableName)
374384
}
375385

376386
/**
387+
* Get metadata pool
388+
*
377389
* @return \Magento\Framework\EntityManager\MetadataPool
378390
*/
379391
private function getMetadataPool()

app/code/Magento/Catalog/Model/Layer/Filter/AbstractFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function apply(\Magento\Framework\App\RequestInterface $request)
139139
}
140140

141141
/**
142-
* Get fiter items count
142+
* Get filter items count
143143
*
144144
* @return int
145145
*/

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontMessagesSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
<section name="StorefrontMessagesSection">
1212
<element name="success" type="text" selector="div.message-success.success.message"/>
1313
<element name="error" type="text" selector="div.message-error.error.message"/>
14+
<element name="noticeMessage" type="text" selector="div.message-notice"/>
1415
</section>
1516
</sections>

app/code/Magento/Catalog/Test/Mftf/Test/CheckTierPricingOfProductsTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@
147147
<!--Create new order-->
148148
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="CreateNewOrder">
149149
<argument name="customer" value="Simple_US_Customer"/>
150+
<argument name="storeView" value="customStoreView"/>
150151
</actionGroup>
151-
<click selector="{{OrdersGridSection.website('secondStoreView')}}" stepKey="ClickToSelectStore"/>
152-
<waitForPageLoad stepKey="waitForPageOpened"/>
152+
153153
<click selector="{{OrdersGridSection.addProducts}}" stepKey="clickToAddProduct"/>
154154
<waitForPageLoad stepKey="waitForProductsOpened"/>
155155
<!--TEST CASE #1-->

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptions.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MAGETWO-61717"/>
1919
<group value="Catalog"/>
20+
<!-- skip due to MAGETWO-97424 -->
21+
<group value="skip"/>
2022
</annotations>
2123
<before>
2224
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Magento_CatalogAnalytics module
22

3-
The Magento_CatalogAnalytics module configures data definitions for a data collection related to the Catalog module entities to be used in [Advanced Reporting](http://devdocs.magento.com/guides/v2.2/advanced-reporting/modules.html).
3+
The Magento_CatalogAnalytics module configures data definitions for a data collection related to the Catalog module entities to be used in [Advanced Reporting](https://devdocs.magento.com/guides/v2.2/advanced-reporting/modules.html).

app/code/Magento/CatalogSearch/Model/Layer/Filter/Attribute.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,10 @@ protected function _getItemsData()
9191
return $this->itemDataBuilder->build();
9292
}
9393

94-
$productSize = $productCollection->getSize();
95-
9694
$options = $attribute->getFrontend()
9795
->getSelectOptions();
9896
foreach ($options as $option) {
99-
$this->buildOptionData($option, $isAttributeFilterable, $optionsFacetedData, $productSize);
97+
$this->buildOptionData($option, $isAttributeFilterable, $optionsFacetedData);
10098
}
10199

102100
return $this->itemDataBuilder->build();
@@ -108,17 +106,16 @@ protected function _getItemsData()
108106
* @param array $option
109107
* @param boolean $isAttributeFilterable
110108
* @param array $optionsFacetedData
111-
* @param int $productSize
112109
* @return void
113110
*/
114-
private function buildOptionData($option, $isAttributeFilterable, $optionsFacetedData, $productSize)
111+
private function buildOptionData($option, $isAttributeFilterable, $optionsFacetedData)
115112
{
116113
$value = $this->getOptionValue($option);
117114
if ($value === false) {
118115
return;
119116
}
120117
$count = $this->getOptionCount($value, $optionsFacetedData);
121-
if ($isAttributeFilterable && (!$this->isOptionReducesResults($count, $productSize) || $count === 0)) {
118+
if ($isAttributeFilterable && $count === 0) {
122119
return;
123120
}
124121

app/code/Magento/CatalogSearch/Test/Unit/Model/Layer/Filter/AttributeTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,6 @@ public function testGetItemsWithoutApply()
321321
->method('build')
322322
->will($this->returnValue($builtData));
323323

324-
$this->fulltextCollection->expects($this->once())
325-
->method('getSize')
326-
->will($this->returnValue(50));
327-
328324
$expectedFilterItems = [
329325
$this->createFilterItem(0, $builtData[0]['label'], $builtData[0]['value'], $builtData[0]['count']),
330326
$this->createFilterItem(1, $builtData[1]['label'], $builtData[1]['value'], $builtData[1]['count']),
@@ -383,9 +379,6 @@ public function testGetItemsOnlyWithResults()
383379
$this->fulltextCollection->expects($this->once())
384380
->method('getFacetedData')
385381
->willReturn($facetedData);
386-
$this->fulltextCollection->expects($this->once())
387-
->method('getSize')
388-
->will($this->returnValue(50));
389382

390383
$this->itemDataBuilder->expects($this->once())
391384
->method('addItemData')

0 commit comments

Comments
 (0)