Skip to content

Commit 7ebf409

Browse files
author
Stanislav Idolov
authored
🔃 [EngCom] Public Pull Requests - 2.2-develop
Accepted Public Pull Requests: - #17019: Fixes Black color coding standard. (by @chirag-wagento) - #16965: fix: add hasrequired notice for create account form and password forg� (by @DanielRuf) - #16921: Slight Changes to Code (by @tiagosampaio) - #16946: Delete all unused imports of lib/internal/Magento (by @osrecio) - #16883: Update nginx.config.sample to exclude php5-fpm (by @sean-wcb) - #16900: Add Clean Code (by @hryvinskyi) - #16863: Configurable Product with Only Size Options (No Color Options) Shows � (by @ronak2ram) - #16560: Admin user auth controller refactor (by @AnshuMishra17) Fixed GitHub Issues: - #16843: Magento 2.2.5: Configurable Product with Only Size Options (No Color Options) Shows No Image in Cart (reported by @uandiweb) has been fixed in #16863 by @ronak2ram in 2.2-develop branch Related commits: 1. 108c2c5 2. 4e32d06
2 parents 95d2969 + cdb3342 commit 7ebf409

File tree

106 files changed

+185
-200
lines changed

Some content is hidden

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

106 files changed

+185
-200
lines changed

app/code/Magento/Catalog/Block/Product/ImageBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected function getRatio(\Magento\Catalog\Helper\Image $helper)
122122
public function create()
123123
{
124124
/** @var \Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface $simpleOption */
125-
$simpleOption = $this->product->getCustomOption('simple_product');
125+
$simpleOption = $this->product->getOptionById('simple_product');
126126

127127
if ($simpleOption !== null) {
128128
$optionProduct = $simpleOption->getProduct();

app/code/Magento/Catalog/Test/Unit/Block/Product/ImageBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ public function testCreateWithSimpleProduct($data, $expected)
306306
$simpleOptionMock = $this->createMock(\Magento\Wishlist\Model\Item\Option::class);
307307
$simpleProductMock = $this->createMock(\Magento\Catalog\Model\Product::class);
308308

309-
$productMock->expects($this->once())->method('getCustomOption')
309+
$productMock->expects($this->once())->method('getOptionById')
310310
->with('simple_product')->willReturn($simpleOptionMock);
311311

312312
$simpleOptionMock->expects($this->once())->method('getProduct')->willReturn($simpleProductMock);

app/code/Magento/CatalogRule/Model/Rule/Job.php

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
* See COPYING.txt for license details.
99
*/
1010

11+
namespace Magento\CatalogRule\Model\Rule;
12+
13+
use Magento\CatalogRule\Model\Indexer\Rule\RuleProductProcessor;
14+
1115
/**
1216
* Catalog Rule job model
1317
*
@@ -18,13 +22,8 @@
1822
* @method bool hasSuccess()
1923
* @method bool hasError()
2024
*
21-
* @author Magento Core Team <core@magentocommerce.com>
22-
*/
23-
namespace Magento\CatalogRule\Model\Rule;
24-
25-
use Magento\CatalogRule\Model\Indexer\Rule\RuleProductProcessor;
26-
27-
/**
25+
* @author Magento Core Team <core@magentocommerce.com>
26+
*
2827
* @api
2928
* @since 100.0.2
3029
*/
@@ -39,10 +38,14 @@ class Job extends \Magento\Framework\DataObject
3938
* Basic object initialization
4039
*
4140
* @param RuleProductProcessor $ruleProcessor
41+
* @param array $data
4242
*/
43-
public function __construct(RuleProductProcessor $ruleProcessor)
44-
{
43+
public function __construct(
44+
RuleProductProcessor $ruleProcessor,
45+
array $data = []
46+
) {
4547
$this->ruleProcessor = $ruleProcessor;
48+
parent::__construct($data);
4649
}
4750

4851
/**

app/code/Magento/Cms/Controller/Adminhtml/Block/Delete.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ public function execute()
2626
$model->load($id);
2727
$model->delete();
2828
// display success message
29-
$this->messageManager->addSuccess(__('You deleted the block.'));
29+
$this->messageManager->addSuccessMessage(__('You deleted the block.'));
3030
// go to grid
3131
return $resultRedirect->setPath('*/*/');
3232
} catch (\Exception $e) {
3333
// display error message
34-
$this->messageManager->addError($e->getMessage());
34+
$this->messageManager->addErrorMessage($e->getMessage());
3535
// go back to edit form
3636
return $resultRedirect->setPath('*/*/edit', ['block_id' => $id]);
3737
}
3838
}
3939
// display error message
40-
$this->messageManager->addError(__('We can\'t find a block to delete.'));
40+
$this->messageManager->addErrorMessage(__('We can\'t find a block to delete.'));
4141
// go to grid
4242
return $resultRedirect->setPath('*/*/');
4343
}

app/code/Magento/Cms/Controller/Adminhtml/Block/Edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function execute()
4242
if ($id) {
4343
$model->load($id);
4444
if (!$model->getId()) {
45-
$this->messageManager->addError(__('This block no longer exists.'));
45+
$this->messageManager->addErrorMessage(__('This block no longer exists.'));
4646
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
4747
$resultRedirect = $this->resultRedirectFactory->create();
4848
return $resultRedirect->setPath('*/*/');

app/code/Magento/Cms/Controller/Adminhtml/Block/InlineEdit.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public function __construct(
4646

4747
/**
4848
* @return \Magento\Framework\Controller\ResultInterface
49+
* @throws \Magento\Framework\Exception\LocalizedException
4950
*/
5051
public function execute()
5152
{

app/code/Magento/Cms/Controller/Adminhtml/Block/MassDelete.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function execute()
6060
$block->delete();
6161
}
6262

63-
$this->messageManager->addSuccess(__('A total of %1 record(s) have been deleted.', $collectionSize));
63+
$this->messageManager->addSuccessMessage(__('A total of %1 record(s) have been deleted.', $collectionSize));
6464

6565
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
6666
$resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);

app/code/Magento/Cms/Controller/Adminhtml/Page/Delete.php

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,35 +26,42 @@ public function execute()
2626
$id = $this->getRequest()->getParam('page_id');
2727
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
2828
$resultRedirect = $this->resultRedirectFactory->create();
29+
2930
if ($id) {
3031
$title = "";
3132
try {
3233
// init model and delete
3334
$model = $this->_objectManager->create(\Magento\Cms\Model\Page::class);
3435
$model->load($id);
36+
3537
$title = $model->getTitle();
3638
$model->delete();
39+
3740
// display success message
38-
$this->messageManager->addSuccess(__('The page has been deleted.'));
41+
$this->messageManager->addSuccessMessage(__('The page has been deleted.'));
42+
3943
// go to grid
40-
$this->_eventManager->dispatch(
41-
'adminhtml_cmspage_on_delete',
42-
['title' => $title, 'status' => 'success']
43-
);
44+
$this->_eventManager->dispatch('adminhtml_cmspage_on_delete', [
45+
'title' => $title,
46+
'status' => 'success'
47+
]);
48+
4449
return $resultRedirect->setPath('*/*/');
4550
} catch (\Exception $e) {
4651
$this->_eventManager->dispatch(
4752
'adminhtml_cmspage_on_delete',
4853
['title' => $title, 'status' => 'fail']
4954
);
5055
// display error message
51-
$this->messageManager->addError($e->getMessage());
56+
$this->messageManager->addErrorMessage($e->getMessage());
5257
// go back to edit form
5358
return $resultRedirect->setPath('*/*/edit', ['page_id' => $id]);
5459
}
5560
}
61+
5662
// display error message
57-
$this->messageManager->addError(__('We can\'t find a page to delete.'));
63+
$this->messageManager->addErrorMessage(__('We can\'t find a page to delete.'));
64+
5865
// go to grid
5966
return $resultRedirect->setPath('*/*/');
6067
}

app/code/Magento/Cms/Controller/Adminhtml/Page/Edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function execute()
7676
if ($id) {
7777
$model->load($id);
7878
if (!$model->getId()) {
79-
$this->messageManager->addError(__('This page no longer exists.'));
79+
$this->messageManager->addErrorMessage(__('This page no longer exists.'));
8080
/** \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
8181
$resultRedirect = $this->resultRedirectFactory->create();
8282
return $resultRedirect->setPath('*/*/');

app/code/Magento/Cms/Controller/Adminhtml/Page/InlineEdit.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public function __construct(
5757

5858
/**
5959
* @return \Magento\Framework\Controller\ResultInterface
60+
* @throws \Magento\Framework\Exception\LocalizedException
6061
*/
6162
public function execute()
6263
{

0 commit comments

Comments
 (0)