Skip to content

Commit 1507bb1

Browse files
author
Oleksii Korshenko
authored
Merge pull request #814 from magento-engcom/develop-prs
[EngCom] Public Pull Requests Public Pull Requests: #8418 #8416 #8414 #8373 #8397 #8419 #8151
2 parents bc3f67e + 2f9618e commit 1507bb1

File tree

26 files changed

+309
-119
lines changed

26 files changed

+309
-119
lines changed

app/code/Magento/Backup/Controller/Adminhtml/Index/Grid.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@
66
*/
77
namespace Magento\Backup\Controller\Adminhtml\Index;
88

9+
use Magento\Framework\Controller\ResultFactory;
10+
911
class Grid extends \Magento\Backup\Controller\Adminhtml\Index
1012
{
1113
/**
1214
* Backup list action
1315
*
14-
* @return void
16+
* @return \Magento\Framework\Controller\ResultInterface
1517
*/
1618
public function execute()
1719
{
18-
$this->_view->loadLayout();
19-
$this->_view->renderLayout();
20+
return $this->resultFactory->create(ResultFactory::TYPE_PAGE);
2021
}
2122
}

app/code/Magento/Catalog/view/frontend/templates/product/view/attributes.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
?>
1515
<?php
1616
$_helper = $this->helper('Magento\Catalog\Helper\Output');
17-
$_product = $block->getProduct()
17+
$_product = $block->getProduct();
1818
?>
1919
<?php if ($_additional = $block->getAdditionalData()): ?>
2020
<div class="additional-attributes-wrapper table-wrapper">

app/code/Magento/CatalogSearch/Controller/Advanced/Index.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
*/
77
namespace Magento\CatalogSearch\Controller\Advanced;
88

9+
use Magento\Framework\Controller\ResultFactory;
10+
911
class Index extends \Magento\Framework\App\Action\Action
1012
{
1113
/**
12-
* @return void
14+
* @return \Magento\Framework\Controller\ResultInterface
1315
*/
1416
public function execute()
1517
{
16-
$this->_view->loadLayout();
17-
$this->_view->renderLayout();
18+
return $this->resultFactory->create(ResultFactory::TYPE_PAGE);
1819
}
1920
}

app/code/Magento/Cms/Model/ResourceModel/Block/Grid/Collection.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,6 @@ public function setAggregations($aggregations)
8484
$this->aggregations = $aggregations;
8585
}
8686

87-
/**
88-
* Retrieve all ids for collection
89-
* Backward compatibility with EAV collection
90-
*
91-
* @param int $limit
92-
* @param int $offset
93-
* @return array
94-
*/
95-
public function getAllIds($limit = null, $offset = null)
96-
{
97-
return $this->getConnection()->fetchCol($this->_getAllIdsSelect($limit, $offset), $this->_bindParams);
98-
}
99-
10087
/**
10188
* Get search criteria.
10289
*

app/code/Magento/Contact/Controller/Index/Index.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@
66
*/
77
namespace Magento\Contact\Controller\Index;
88

9+
use Magento\Framework\Controller\ResultFactory;
10+
911
class Index extends \Magento\Contact\Controller\Index
1012
{
1113
/**
1214
* Show Contact Us page
1315
*
14-
* @return void
16+
* @return \Magento\Framework\Controller\ResultInterface
1517
*/
1618
public function execute()
1719
{
18-
$this->_view->loadLayout();
19-
$this->_view->renderLayout();
20+
return $this->resultFactory->create(ResultFactory::TYPE_PAGE);
2021
}
2122
}

app/code/Magento/Contact/Test/Unit/Controller/Index/IndexTest.php

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
namespace Magento\Contact\Test\Unit\Controller\Index;
88

9+
use Magento\Framework\Controller\ResultFactory;
10+
use Magento\Framework\Controller\ResultInterface;
11+
912
class IndexTest extends \PHPUnit_Framework_TestCase
1013
{
1114
/**
@@ -25,7 +28,7 @@ class IndexTest extends \PHPUnit_Framework_TestCase
2528
* View mock
2629
* @var \Magento\Framework\App\ViewInterface|\PHPUnit_Framework_MockObject_MockObject
2730
*/
28-
protected $_view;
31+
protected $resultFactory;
2932

3033
/**
3134
* Url mock
@@ -43,7 +46,7 @@ protected function setUp()
4346
);
4447
$context = $this->getMock(
4548
\Magento\Framework\App\Action\Context::class,
46-
['getRequest', 'getResponse', 'getView', 'getUrl'],
49+
['getRequest', 'getResponse', 'getResultFactory', 'getUrl'],
4750
[],
4851
'',
4952
false
@@ -67,17 +70,17 @@ protected function setUp()
6770
$this->getMockForAbstractClass(\Magento\Framework\App\ResponseInterface::class, [], '', false)
6871
));
6972

70-
$this->_view = $this->getMock(
71-
\Magento\Framework\App\ViewInterface::class,
73+
$this->resultFactory = $this->getMock(
74+
ResultFactory::class,
7275
[],
7376
[],
7477
'',
7578
false
7679
);
7780

7881
$context->expects($this->once())
79-
->method('getView')
80-
->will($this->returnValue($this->_view));
82+
->method('getResultFactory')
83+
->will($this->returnValue($this->resultFactory));
8184

8285
$this->_controller = new \Magento\Contact\Controller\Index\Index(
8386
$context,
@@ -90,12 +93,12 @@ protected function setUp()
9093

9194
public function testExecute()
9295
{
93-
$this->_view->expects($this->once())
94-
->method('loadLayout');
95-
96-
$this->_view->expects($this->once())
97-
->method('renderLayout');
96+
$resultStub = $this->getMockForAbstractClass(ResultInterface::class);
97+
$this->resultFactory->expects($this->once())
98+
->method('create')
99+
->with(ResultFactory::TYPE_PAGE)
100+
->willReturn($resultStub);
98101

99-
$this->_controller->execute();
102+
$this->assertSame($resultStub, $this->_controller->execute());
100103
}
101104
}

app/code/Magento/User/Controller/Adminhtml/User/Role/Editrolegrid.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@
66
*/
77
namespace Magento\User\Controller\Adminhtml\User\Role;
88

9+
use Magento\Framework\Controller\ResultFactory;
10+
911
class Editrolegrid extends \Magento\User\Controller\Adminhtml\User\Role
1012
{
1113
/**
1214
* Action for ajax request from assigned users grid
1315
*
14-
* @return void
16+
* @return \Magento\Framework\Controller\ResultInterface
1517
*/
1618
public function execute()
1719
{
18-
$this->_view->loadLayout();
19-
$this->_view->renderLayout();
20+
return $this->resultFactory->create(ResultFactory::TYPE_PAGE);
2021
}
2122
}

app/code/Magento/Wishlist/Model/ResourceModel/Item/Collection.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -284,20 +284,10 @@ protected function _assignProducts()
284284
$productCollection->setVisibility($this->_productVisibility->getVisibleInSiteIds());
285285
}
286286

287-
$attributesToSelect = [
288-
'name',
289-
'visibility',
290-
'small_image',
291-
'thumbnail',
292-
'links_purchased_separately',
293-
'links_title',
294-
'price_type'
295-
];
296-
297287
$productCollection->addPriceData()
298288
->addTaxPercents()
299289
->addIdFilter($this->_productIds)
300-
->addAttributeToSelect($attributesToSelect)
290+
->addAttributeToSelect($this->_wishlistConfig->getProductAttributes())
301291
->addOptionsToResult()
302292
->addUrlRewrite();
303293

app/code/Magento/Wishlist/etc/catalog_attributes.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/catalog_attributes.xsd">
99
<group name="wishlist_item">
10+
<attribute name="name"/>
11+
<attribute name="small_image"/>
12+
<attribute name="thumbnail"/>
13+
<attribute name="links_purchased_separately"/>
14+
<attribute name="links_title"/>
15+
<attribute name="price_type"/>
1016
<attribute name="visibility"/>
1117
<attribute name="url_path"/>
1218
<attribute name="url_key"/>

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@
4343
"tubalmartin/cssmin": "2.4.8-p4",
4444
"magento/magento-composer-installer": ">=0.1.11",
4545
"braintree/braintree_php": "3.7.0",
46-
"symfony/console": "~2.3 <2.7",
46+
"symfony/console": "~2.3, !=2.7.0",
4747
"symfony/event-dispatcher": "~2.1",
4848
"symfony/process": "~2.1",
4949
"phpseclib/phpseclib": "2.0.*",
5050
"tedivm/jshrink": "~1.0.1",
51-
"magento/composer": "~1.0.0",
51+
"magento/composer": "~1.1.0",
5252
"lib-libxml": "*",
5353
"ext-ctype": "*",
5454
"ext-gd": "*",

0 commit comments

Comments
 (0)