Skip to content

Commit 6c4c005

Browse files
[Magento Community Engineering] Community Contributions - 2.3-develop
- merged latest code from mainline branch
2 parents 51380a5 + 74aa9c6 commit 6c4c005

File tree

75 files changed

+9271
-183
lines changed

Some content is hidden

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

75 files changed

+9271
-183
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,11 +612,11 @@ To get detailed information about changes in Magento 2.3.0, see the [Release Not
612612

613613
2.2.0
614614
=============
615-
To get detailed information about changes in Magento 2.2.0, see the [Release Notes](https://devdocs.magento.com/guides/v2.2/release-notes/bk-release-notes.html)
615+
To get detailed information about changes in Magento 2.2.0, see the [Release Notes](https://devdocs.magento.com/guides/v2.3/release-notes/bk-release-notes.html)
616616

617617
2.1.0
618618
=============
619-
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")
619+
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.3/release-notes/ReleaseNotes2.1.0CE.html "Magento Community Edition (CE) Release Notes")
620620

621621
2.0.0
622622
=============
@@ -1637,7 +1637,7 @@ Tests:
16371637
* Improved backend menu keyboard accessibility
16381638
* Accessibility improvements: WAI-ARIA in a product item on a category page and related products
16391639
* Checkout flow code can work with a separate DB storage
1640-
* <a href="https://devdocs.magento.com/guides/v1.0/release-notes/changes.html#change-devrc-unit">Unit tests moved to module directories</a>
1640+
* Unit tests moved to module directories
16411641
* Addressed naming inconsistencies in REST routes
16421642
* Added Advanced Developer workflow for frontend developers
16431643
* Setup

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ To learn about issues, click [here][2]. To open an issue, click [here][3].
2020

2121
To suggest documentation improvements, click [here][4].
2222

23-
[1]: <https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html>
24-
[2]: <https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#report>
25-
[3]: <https://github.com/magento/magento2/issues>
26-
[4]: <https://devdocs.magento.com>
23+
[1]: https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html
24+
[2]: https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#report
25+
[3]: https://github.com/magento/magento2/issues
26+
[4]: https://devdocs.magento.com
2727

2828
<h3>Community Maintainers</h3>
2929
The members of this team have been recognized for their outstanding commitment to maintaining and improving Magento. Magento has granted them permission to accept, merge, and reject pull requests, as well as review issues, and thanks these Community Maintainers for their valuable contributions.
Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,30 @@
1-
# Admin Notification
1+
# Magento_AdminNotification module
22

3-
**Admin Notification** provides the ability to alert administrators via
4-
system messages and provides a message inbox for surveys and notifications.
3+
The Magento_AdminNotification module provides the ability to alert administrators via system messages and provides a message inbox for surveys and notifications.
4+
5+
## Installation details
6+
7+
Before disabling or uninstalling this module, note that the Magento_Indexer module depends on this module.
8+
9+
For information about module installation in Magento 2, see [Enable or disable modules](http://devdocs.magento.com/guides/v2.3/install-gde/install/cli/install-cli-subcommands-enable.html).
10+
11+
### Events
12+
13+
This module observes the following events:
14+
15+
- `controller_action_predispatch` event in `Magento\AdminNotification\Observer\PredispatchAdminActionControllerObserver`
16+
17+
### Layouts
18+
19+
This module introduces the following layouts and layout handles in the `view/adminhtml/layout` directory:
20+
21+
- `adminhtml_notification_index`
22+
- `adminhtml_notification_block`
23+
24+
For more information about layouts in Magento 2, see the [Layout documentation](http://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-overview.html).
25+
26+
### UI components
27+
28+
You can extend admin notifications using the `view/adminhtml/ui_component/notification_area.xml` configuration file.
29+
30+
For information about UI components in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.3/ui_comp_guide/bk-ui_comps.html).

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](https://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.3/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](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.
19+
Beyond the [usual module file structure](https://devdocs.magento.com/guides/v2.3/architecture/archi_perspectives/components/modules/mod_intro.html) the module contains a directory `ReportXml`.
20+
[Report XML](https://devdocs.magento.com/guides/v2.3/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/Catalog/Block/Rss/Category.php

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@
1111

1212
/**
1313
* Class Category
14+
*
1415
* @package Magento\Catalog\Block\Rss
16+
*
1517
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1618
*/
1719
class Category extends \Magento\Framework\View\Element\AbstractBlock implements DataProviderInterface
1820
{
19-
/**
20-
* @var \Magento\Catalog\Model\CategoryFactory
21-
*/
21+
/**
22+
* @var \Magento\Catalog\Model\CategoryFactory
23+
*/
2224
protected $categoryFactory;
2325

2426
/**
@@ -50,7 +52,6 @@ class Category extends \Magento\Framework\View\Element\AbstractBlock implements
5052
* @var CategoryRepositoryInterface
5153
*/
5254
protected $categoryRepository;
53-
5455
/**
5556
* @param \Magento\Framework\View\Element\Template\Context $context
5657
* @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
@@ -83,6 +84,8 @@ public function __construct(
8384
}
8485

8586
/**
87+
* Set Block cache key
88+
*
8689
* @return void
8790
*/
8891
protected function _construct()
@@ -97,7 +100,9 @@ protected function _construct()
97100
}
98101

99102
/**
100-
* {@inheritdoc}
103+
* Get info about category by category id
104+
*
105+
* @return array
101106
*/
102107
public function getRssData()
103108
{
@@ -116,7 +121,9 @@ public function getRssData()
116121
$newUrl = $category->getUrl();
117122
$title = $category->getName();
118123
$data = ['title' => $title, 'description' => $title, 'link' => $newUrl, 'charset' => 'UTF-8'];
119-
124+
$attributes = $this->_viewConfig
125+
->getViewConfig()
126+
->getMediaAttributes('Magento_Catalog', $this->imageHelper::MEDIA_TYPE_CONFIG_NODE, 'rss_thumbnail');
120127
/** @var $product \Magento\Catalog\Model\Product */
121128
foreach ($this->rssModel->getProductCollection($category, $this->getStoreId()) as $product) {
122129
$product->setAllowedInRss(true);
@@ -130,7 +137,7 @@ public function getRssData()
130137

131138
$description = '
132139
<table><tr>
133-
<td><a href="%s"><img src="%s" border="0" align="left" height="75" width="75"></a></td>
140+
<td><a href="%s"><img src="%s" border="0" align="left" height="%s" width="%s"></a></td>
134141
<td style="text-decoration:none;">%s %s</td>
135142
</tr></table>
136143
';
@@ -139,6 +146,8 @@ public function getRssData()
139146
$description,
140147
$product->getProductUrl(),
141148
$this->imageHelper->init($product, 'rss_thumbnail')->getUrl(),
149+
isset($attributes['height']) ? $attributes['height'] : 75,
150+
isset($attributes['width']) ? $attributes['width'] : 75,
142151
$product->getDescription(),
143152
$product->getAllowedPriceInRss() ? $this->renderPriceHtml($product) : ''
144153
);
@@ -187,6 +196,8 @@ protected function renderPriceHtml(\Magento\Catalog\Model\Product $product)
187196
}
188197

189198
/**
199+
* Get current Store Id
200+
*
190201
* @return int
191202
*/
192203
protected function getStoreId()
@@ -199,6 +210,8 @@ protected function getStoreId()
199210
}
200211

201212
/**
213+
* Cache lifetime for RSS feed
214+
*
202215
* @return int
203216
*/
204217
public function getCacheLifetime()
@@ -207,7 +220,9 @@ public function getCacheLifetime()
207220
}
208221

209222
/**
210-
* {@inheritdoc}
223+
* Retrieve rss feed enable for category page
224+
*
225+
* @return bool
211226
*/
212227
public function isAllowed()
213228
{
@@ -218,6 +233,8 @@ public function isAllowed()
218233
}
219234

220235
/**
236+
* Get category feed collection
237+
*
221238
* @return array
222239
*/
223240
public function getFeeds()
@@ -257,7 +274,9 @@ public function getFeeds()
257274
}
258275

259276
/**
260-
* {@inheritdoc}
277+
* Check isAuthRequired Required
278+
*
279+
* @return bool
261280
*/
262281
public function isAuthRequired()
263282
{

app/code/Magento/Catalog/Test/Unit/Block/Rss/CategoryTest.php

Lines changed: 51 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Catalog\Test\Unit\Block\Rss;
78

89
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
@@ -73,6 +74,16 @@ class CategoryTest extends \PHPUnit\Framework\TestCase
7374
*/
7475
protected $categoryRepository;
7576

77+
/**
78+
* @var \Magento\Framework\View\ConfigInterface|\PHPUnit_Framework_MockObject_MockObject
79+
*/
80+
protected $viewConfig;
81+
82+
/**
83+
* @var \Magento\Framework\Config\View
84+
*/
85+
protected $configView;
86+
7687
/**
7788
* @var array
7889
*/
@@ -115,6 +126,8 @@ protected function setUp()
115126
$this->storeManager->expects($this->any())->method('getStore')->will($this->returnValue($store));
116127
$this->scopeConfig = $this->createMock(\Magento\Framework\App\Config\ScopeConfigInterface::class);
117128
$this->categoryRepository = $this->createMock(\Magento\Catalog\Api\CategoryRepositoryInterface::class);
129+
$this->viewConfig = $this->getMockBuilder(\Magento\Framework\View\ConfigInterface::class)
130+
->getMockForAbstractClass();
118131
$objectManagerHelper = new ObjectManagerHelper($this);
119132
$this->block = $objectManagerHelper->getObject(
120133
\Magento\Catalog\Block\Rss\Category::class,
@@ -130,6 +143,7 @@ protected function setUp()
130143
'customerSession' => $this->customerSession,
131144
'storeManager' => $this->storeManager,
132145
'categoryRepository' => $this->categoryRepository,
146+
'viewConfig' => $this->viewConfig,
133147
]
134148
);
135149
}
@@ -145,16 +159,26 @@ public function testGetRssData()
145159

146160
$this->categoryRepository->expects($this->once())->method('get')->will($this->returnValue($category));
147161

162+
$configViewMock = $this->getMockBuilder(\Magento\Framework\Config\View::class)
163+
->disableOriginalConstructor()
164+
->getMock();
165+
166+
$this->viewConfig->expects($this->once())
167+
->method('getViewConfig')
168+
->willReturn($configViewMock);
169+
148170
$product = $this->getMockBuilder(\Magento\catalog\Model\Product::class)
149-
->setMethods([
150-
'__sleep',
151-
'__wakeup',
152-
'getName',
153-
'getAllowedInRss',
154-
'getProductUrl',
155-
'getDescription',
156-
'getAllowedPriceInRss',
157-
])->disableOriginalConstructor()->getMock();
171+
->setMethods(
172+
[
173+
'__sleep',
174+
'__wakeup',
175+
'getName',
176+
'getAllowedInRss',
177+
'getProductUrl',
178+
'getDescription',
179+
'getAllowedPriceInRss'
180+
]
181+
)->disableOriginalConstructor()->getMock();
158182
$product->expects($this->once())->method('getName')->will($this->returnValue('Product Name'));
159183
$product->expects($this->once())->method('getAllowedInRss')->will($this->returnValue(true));
160184
$product->expects($this->exactly(2))->method('getProductUrl')
@@ -213,23 +237,23 @@ public function testGetFeeds()
213237
->disableOriginalConstructor()->getMock();
214238

215239
$collection = $this->getMockBuilder(\Magento\Catalog\Model\ResourceModel\Category\Collection::class)
216-
->setMethods([
217-
'addIdFilter',
218-
'addAttributeToSelect',
219-
'addAttributeToSort',
220-
'load',
221-
'addAttributeToFilter',
222-
'getIterator',
223-
])->disableOriginalConstructor()->getMock();
240+
->setMethods(
241+
[
242+
'addIdFilter',
243+
'addAttributeToSelect',
244+
'addAttributeToSort',
245+
'load',
246+
'addAttributeToFilter',
247+
'getIterator'
248+
]
249+
)->disableOriginalConstructor()->getMock();
224250
$collection->expects($this->once())->method('addIdFilter')->will($this->returnSelf());
225251
$collection->expects($this->exactly(3))->method('addAttributeToSelect')->will($this->returnSelf());
226252
$collection->expects($this->once())->method('addAttributeToSort')->will($this->returnSelf());
227253
$collection->expects($this->once())->method('addAttributeToFilter')->will($this->returnSelf());
228254
$collection->expects($this->once())->method('load')->will($this->returnSelf());
229-
$collection->expects($this->once())->method('getIterator')->will($this->returnValue(
230-
new \ArrayIterator([$category])
231-
));
232-
255+
$collection->expects($this->once())->method('getIterator')
256+
->will($this->returnValue(new \ArrayIterator([$category])));
233257
$category->expects($this->once())->method('getId')->will($this->returnValue(1));
234258
$category->expects($this->once())->method('getName')->will($this->returnValue('Category Name'));
235259
$category->expects($this->once())->method('getResourceCollection')->will($this->returnValue($collection));
@@ -250,9 +274,12 @@ public function testGetFeeds()
250274

251275
$this->rssUrlBuilder->expects($this->once())->method('getUrl')
252276
->will($this->returnValue('http://magento.com/category-name.html'));
253-
$feeds = ['group' => 'Categories', 'feeds' => [
254-
['label' => 'Category Name', 'link' => 'http://magento.com/category-name.html'],
255-
]];
277+
$feeds = [
278+
'group' => 'Categories',
279+
'feeds' => [
280+
['label' => 'Category Name', 'link' => 'http://magento.com/category-name.html'],
281+
]
282+
];
256283
$this->assertEquals($feeds, $this->block->getFeeds());
257284
}
258285
}

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $formName = $block->getFormName();
3737
type="hidden"
3838
value="<?= $block->escapeHtmlAttr($typeData['value']) ?>"/>
3939
<?php
40-
} ?>
40+
} ?>
4141

4242
<script id="<?= $block->getHtmlId() ?>-template" type="text/x-magento-template">
4343
<div class="image item<% if (data.disabled == 1) { %> hidden-for-front<% } %>"
@@ -61,7 +61,7 @@ $formName = $block->getFormName();
6161
value="<%- data.label %>"/>
6262
<input type="hidden"
6363
name="<?= $block->escapeHtmlAttr($elementName) ?>[<%- data.file_id %>][disabled]"
64-
data-form-part="<?= $block->escapeHtmlAttr(formName) ?>"
64+
data-form-part="<?= $block->escapeHtmlAttr($formName) ?>"
6565
value="<%- data.disabled %>"/>
6666
<input type="hidden"
6767
name="<?= $block->escapeHtmlAttr($elementName) ?>[<%- data.file_id %>][media_type]"
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](https://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.3/advanced-reporting/modules.html).

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontSortingByPriceForConfigurableWithCatalogRuleAppliedTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<description value="Sort by price should be correct if the apply Catalog Rule to child product of configurable product"/>
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MAGETWO-69988"/>
19-
<group value="сonfigurable_product"/>
19+
<group value="configurable_product"/>
2020
</annotations>
2121
<before>
2222
<createData entity="ApiCategory" stepKey="createCategory"/>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVisibilityOfDuplicateProductTest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@
143143
<reloadPage stepKey="reloadDuplicatedProductPage"/>
144144
<waitForPageLoad stepKey="waitForDuplicatedProductReload"/>
145145
<click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="createConfigurationsDuplicatedProduct"/>
146+
<waitForElementVisible selector="{{AdminGridSelectRows.multicheckDropdown}}" stepKey="waitForCreateConfigurationsPageLoad"/>
147+
<click selector="{{AdminGridSelectRows.multicheckDropdown}}" stepKey="openMulticheckDropdown"/>
148+
<click selector="{{AdminGridSelectRows.multicheckOption('Deselect All')}}" stepKey="DeselectAllAttributes"/>
146149
<actionGroup ref="createOptionsForAttribute" stepKey="createOptionsForDuplicatedProduct">
147150
<argument name="attributeName" value="{{productAttributeColor.default_label}}"/>
148151
<argument name="firstOptionName" value="{{colorConfigurableProductAttribute1.name}}"/>

app/code/Magento/ConfigurableProduct/view/adminhtml/ui_component/product_attributes_listing.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
<selectionsColumn name="ids" sortOrder="0">
5656
<settings>
5757
<indexField>attribute_id</indexField>
58+
<preserveSelectionsOnFilter>true</preserveSelectionsOnFilter>
5859
</settings>
5960
</selectionsColumn>
6061
<column name="attribute_code">

0 commit comments

Comments
 (0)