Skip to content

Commit b664f97

Browse files
author
Volodymyr klymenko
committed
Merge remote-tracking branch 'm2origin/develop' into pr7
Conflicts: composer.lock
2 parents 5cf6ebe + 4148723 commit b664f97

File tree

265 files changed

+27904
-2371
lines changed

Some content is hidden

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

265 files changed

+27904
-2371
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
* Fixed an issue where first store could not be selected on frontend
113113
* Fixed an issue with performance toolkit category creation
114114
* Fixed an issue when columns 'Interval', 'Price Rule' had incorrect values in Coupon Usage report
115-
* Fixed an issue where fatal error occured on Abandoned Carts report grid
115+
* Fixed an issue where fatal error occurred on Abandoned Carts report grid
116116
* Fixed an issue where it was not possible to add product to shopping cart if Use Secure URLs in Frontend = Yes
117117
* Fixed an issue where email was not required during Guest Checkout
118118
* Fixed broken ability to skip reindex in `bin/magento setup:performance:generate-fixtures` command
@@ -2699,7 +2699,7 @@
26992699
* Fixed an issue with status and visibility settings of a related product on the backend
27002700
* Fixed an issue with unused DB indexes, which used resources, but did not contribute to higher performance
27012701
* Fixed an issue where it was possible to create a downloadable product without specifying a link or a file
2702-
* Fixed an issue where a fatal error occured when opening a fixed bundle product with custom options page on the frontend
2702+
* Fixed an issue where a fatal error occurred when opening a fixed bundle product with custom options page on the frontend
27032703
* Fixed an issue where the was a wrong config key for backend cataloginventory
27042704
* Processed GitHub requests:
27052705
* [#548] (https://github.com/magento/magento2/issues/548) -- Console installer doesn't checks filesystem permissions

app/code/Magento/Backend/App/ConfigInterface.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ interface ConfigInterface
1717
*
1818
* @param string $path
1919
* @return mixed
20+
* @api
2021
*/
2122
public function getValue($path);
2223

@@ -26,6 +27,7 @@ public function getValue($path);
2627
* @param string $path
2728
* @param mixed $value
2829
* @return void
30+
* @api
2931
*/
3032
public function setValue($path, $value);
3133

@@ -34,6 +36,7 @@ public function setValue($path, $value);
3436
*
3537
* @param string $path
3638
* @return bool
39+
* @api
3740
*/
3841
public function isSetFlag($path);
3942
}

app/code/Magento/Backend/Block/Widget/Button/ContextInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ interface ContextInterface
1313
*
1414
* @param \Magento\Backend\Block\Widget\Button\Item $item
1515
* @return bool
16+
* @api
1617
*/
1718
public function canRender(\Magento\Backend\Block\Widget\Button\Item $item);
1819
}

app/code/Magento/Backend/Block/Widget/Button/ToolbarInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ interface ToolbarInterface
1414
* @param \Magento\Framework\View\Element\AbstractBlock $context
1515
* @param \Magento\Backend\Block\Widget\Button\ButtonList $buttonList
1616
* @return void
17+
* @api
1718
*/
1819
public function pushButtons(
1920
\Magento\Framework\View\Element\AbstractBlock $context,

app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/FilterInterface.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,20 @@ interface FilterInterface
1616
{
1717
/**
1818
* @return Column
19+
* @api
1920
*/
2021
public function getColumn();
2122

2223
/**
2324
* @param Column $column
2425
* @return AbstractFilter
26+
* @api
2527
*/
2628
public function setColumn($column);
2729

2830
/**
2931
* @return string
32+
* @api
3033
*/
3134
public function getHtml();
3235
}

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/RendererInterface.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ interface RendererInterface
2020
* @param Column $column
2121
* @return void
2222
* @abstract
23+
* @api
2324
*/
2425
public function setColumn($column);
2526

@@ -28,6 +29,7 @@ public function setColumn($column);
2829
*
2930
* @abstract
3031
* @return void
32+
* @api
3133
*/
3234
public function getColumn();
3335

@@ -36,6 +38,7 @@ public function getColumn();
3638
*
3739
* @param \Magento\Framework\Object $row
3840
* @return string
41+
* @api
3942
*/
4043
public function render(\Magento\Framework\Object $row);
4144
}

app/code/Magento/Backend/Block/Widget/Grid/ExportInterface.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ interface ExportInterface
1111
* Retrieve grid export types
1212
*
1313
* @return array|bool
14+
* @api
1415
*/
1516
public function getExportTypes();
1617

1718
/**
1819
* Retrieve grid id
1920
*
2021
* @return string
22+
* @api
2123
*/
2224
public function getId();
2325

@@ -43,20 +45,23 @@ public function addExportType($url, $label);
4345
* Return array with keys type and value
4446
*
4547
* @return array
48+
* @api
4649
*/
4750
public function getCsvFile();
4851

4952
/**
5053
* Retrieve Grid data as CSV
5154
*
5255
* @return string
56+
* @api
5357
*/
5458
public function getCsv();
5559

5660
/**
5761
* Retrieve data in xml
5862
*
5963
* @return string
64+
* @api
6065
*/
6166
public function getXml();
6267

@@ -67,13 +72,15 @@ public function getXml();
6772
*
6873
* @param string $sheetName
6974
* @return array
75+
* @api
7076
*/
7177
public function getExcelFile($sheetName = '');
7278

7379
/**
7480
* Retrieve grid data as MS Excel 2003 XML Document
7581
*
7682
* @return string
83+
* @api
7784
*/
7885
public function getExcel();
7986
}

app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item/Additional/AdditionalInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ interface AdditionalInterface
1515
/**
1616
* @param array $configuration
1717
* @return $this
18+
* @api
1819
*/
1920
public function createFromConfiguration(array $configuration);
2021
}

app/code/Magento/Backend/Block/Widget/Tab/TabInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,31 @@ interface TabInterface
1717
* Return Tab label
1818
*
1919
* @return string
20+
* @api
2021
*/
2122
public function getTabLabel();
2223

2324
/**
2425
* Return Tab title
2526
*
2627
* @return string
28+
* @api
2729
*/
2830
public function getTabTitle();
2931

3032
/**
3133
* Can show tab in tabs
3234
*
3335
* @return boolean
36+
* @api
3437
*/
3538
public function canShowTab();
3639

3740
/**
3841
* Tab is hidden
3942
*
4043
* @return boolean
44+
* @api
4145
*/
4246
public function isHidden();
4347
}

app/code/Magento/Backend/Controller/Adminhtml/Cache/CleanImages.php

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,29 @@
77
namespace Magento\Backend\Controller\Adminhtml\Cache;
88

99
use Magento\Framework\Exception\LocalizedException;
10+
use Magento\Framework\Controller\ResultFactory;
1011

1112
class CleanImages extends \Magento\Backend\Controller\Adminhtml\Cache
1213
{
1314
/**
1415
* Clean JS/css files cache
1516
*
1617
* @return \Magento\Backend\Model\View\Result\Redirect
17-
* @throws LocalizedException
1818
*/
1919
public function execute()
2020
{
21-
$this->_objectManager->create('Magento\Catalog\Model\Product\Image')->clearCache();
22-
$this->_eventManager->dispatch('clean_catalog_images_cache_after');
23-
$this->messageManager->addSuccess(__('The image cache was cleaned.'));
21+
try {
22+
$this->_objectManager->create('Magento\Catalog\Model\Product\Image')->clearCache();
23+
$this->_eventManager->dispatch('clean_catalog_images_cache_after');
24+
$this->messageManager->addSuccess(__('The image cache was cleaned.'));
25+
} catch (LocalizedException $e) {
26+
$this->messageManager->addError($e->getMessage());
27+
} catch (\Exception $e) {
28+
$this->messageManager->addException($e, __('An error occurred while clearing the image cache.'));
29+
}
2430

25-
return $this->getDefaultResult();
26-
}
27-
28-
/**
29-
* {@inheritdoc}
30-
*
31-
* @return \Magento\Backend\Model\View\Result\Redirect
32-
*/
33-
public function getDefaultResult()
34-
{
35-
$resultRedirect = $this->resultRedirectFactory->create();
31+
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
32+
$resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
3633
return $resultRedirect->setPath('adminhtml/*');
3734
}
3835
}

app/code/Magento/Backend/Controller/Adminhtml/Cache/CleanMedia.php

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,29 @@
77
namespace Magento\Backend\Controller\Adminhtml\Cache;
88

99
use Magento\Framework\Exception\LocalizedException;
10+
use Magento\Framework\Controller\ResultFactory;
1011

1112
class CleanMedia extends \Magento\Backend\Controller\Adminhtml\Cache
1213
{
1314
/**
1415
* Clean JS/css files cache
1516
*
1617
* @return \Magento\Backend\Model\View\Result\Redirect
17-
* @throws LocalizedException
1818
*/
1919
public function execute()
2020
{
21-
$this->_objectManager->get('Magento\Framework\View\Asset\MergeService')->cleanMergedJsCss();
22-
$this->_eventManager->dispatch('clean_media_cache_after');
23-
$this->messageManager->addSuccess(__('The JavaScript/CSS cache has been cleaned.'));
21+
try {
22+
$this->_objectManager->get('Magento\Framework\View\Asset\MergeService')->cleanMergedJsCss();
23+
$this->_eventManager->dispatch('clean_media_cache_after');
24+
$this->messageManager->addSuccess(__('The JavaScript/CSS cache has been cleaned.'));
25+
} catch (LocalizedException $e) {
26+
$this->messageManager->addError($e->getMessage());
27+
} catch (\Exception $e) {
28+
$this->messageManager->addException($e, __('An error occurred while clearing the JavaScript/CSS cache.'));
29+
}
2430

25-
return $this->getDefaultResult();
26-
}
27-
28-
/**
29-
* {@inheritdoc}
30-
*
31-
* @return \Magento\Backend\Model\View\Result\Redirect
32-
*/
33-
public function getDefaultResult()
34-
{
35-
$resultRedirect = $this->resultRedirectFactory->create();
31+
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
32+
$resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
3633
return $resultRedirect->setPath('adminhtml/*');
3734
}
3835
}

app/code/Magento/Backend/Controller/Adminhtml/Cache/MassDisable.php

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,46 +7,43 @@
77
namespace Magento\Backend\Controller\Adminhtml\Cache;
88

99
use Magento\Framework\Exception\LocalizedException;
10+
use Magento\Framework\Controller\ResultFactory;
1011

1112
class MassDisable extends \Magento\Backend\Controller\Adminhtml\Cache
1213
{
1314
/**
1415
* Mass action for cache disabling
1516
*
1617
* @return \Magento\Backend\Model\View\Result\Redirect
17-
* @throws \Magento\Framework\Exception\LocalizedException|\Exception
1818
*/
1919
public function execute()
2020
{
21-
$types = $this->getRequest()->getParam('types');
22-
$updatedTypes = 0;
23-
if (!is_array($types)) {
24-
$types = [];
25-
}
26-
$this->_validateTypes($types);
27-
foreach ($types as $code) {
28-
if ($this->_cacheState->isEnabled($code)) {
29-
$this->_cacheState->setEnabled($code, false);
30-
$updatedTypes++;
21+
try {
22+
$types = $this->getRequest()->getParam('types');
23+
$updatedTypes = 0;
24+
if (!is_array($types)) {
25+
$types = [];
3126
}
32-
$this->_cacheTypeList->cleanType($code);
33-
}
34-
if ($updatedTypes > 0) {
35-
$this->_cacheState->persist();
36-
$this->messageManager->addSuccess(__("%1 cache type(s) disabled.", $updatedTypes));
27+
$this->_validateTypes($types);
28+
foreach ($types as $code) {
29+
if ($this->_cacheState->isEnabled($code)) {
30+
$this->_cacheState->setEnabled($code, false);
31+
$updatedTypes++;
32+
}
33+
$this->_cacheTypeList->cleanType($code);
34+
}
35+
if ($updatedTypes > 0) {
36+
$this->_cacheState->persist();
37+
$this->messageManager->addSuccess(__("%1 cache type(s) disabled.", $updatedTypes));
38+
}
39+
} catch (LocalizedException $e) {
40+
$this->messageManager->addError($e->getMessage());
41+
} catch (\Exception $e) {
42+
$this->messageManager->addException($e, __('An error occurred while disabling cache.'));
3743
}
3844

39-
return $this->getDefaultResult();
40-
}
41-
42-
/**
43-
* {@inheritdoc}
44-
*
45-
* @return \Magento\Backend\Model\View\Result\Redirect
46-
*/
47-
public function getDefaultResult()
48-
{
49-
$resultRedirect = $this->resultRedirectFactory->create();
45+
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
46+
$resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
5047
return $resultRedirect->setPath('adminhtml/*');
5148
}
5249
}

0 commit comments

Comments
 (0)