Skip to content

Commit

Permalink
Merge branch '2.3-develop' into fix-product-import-enable-qty-inc
Browse files Browse the repository at this point in the history
  • Loading branch information
simpleadm authored May 4, 2018
2 parents 16b8b2c + a902370 commit cb83575
Show file tree
Hide file tree
Showing 2,443 changed files with 84,086 additions and 23,449 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ services:
- elasticsearch
language: php
php:
- 7.0
- 7.1
- 7.2
env:
global:
- COMPOSER_BIN_DIR=~/bin
Expand All @@ -35,13 +35,13 @@ env:
- TEST_SUITE=functional
matrix:
exclude:
- php: 7.0
- php: 7.1
env: TEST_SUITE=static
- php: 7.0
- php: 7.1
env: TEST_SUITE=js GRUNT_COMMAND=spec
- php: 7.0
- php: 7.1
env: TEST_SUITE=js GRUNT_COMMAND=static
- php: 7.0
- php: 7.1
env: TEST_SUITE=functional
cache:
apt: true
Expand Down
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/magento/magento2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/magento-2/localized.png)](https://crowdin.com/project/magento-2)
<h2>Welcome</h2>
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting edge, feature-rich eCommerce solution that gets results.
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting-edge, feature-rich eCommerce solution that gets results.

## Magento system requirements
[Magento system requirements](http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements2.html)
[Magento system requirements](http://devdocs.magento.com/guides/v2.3/install-gde/system-requirements2.html)

## Install Magento
To install Magento, see either:

* [Magento DevBox](https://magento.com/tech-resources/download), the easiest way to get started with Magento.
* [Installation guide](http://devdocs.magento.com/guides/v2.2/install-gde/bk-install-guide.html)
* [Installation guide](http://devdocs.magento.com/guides/v2.3/install-gde/bk-install-guide.html)

<h2>Contributing to the Magento 2 code base</h2>
Contributions can take the form of new components or features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes, optimizations, or just good suggestions.
Expand All @@ -23,11 +22,24 @@ To learn about issues, click [here][2]. To open an issue, click [here][3].

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

[1]: <http://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html>
[2]: <http://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#report>
[1]: <http://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html>
[2]: <http://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#report>
[3]: <https://github.com/magento/magento2/issues>
[4]: <http://devdocs.magento.com>

<h3>Community Maintainers</h3>
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.

<a href="https://magento.com/magento-contributors#maintainers">
<img src="https://raw.githubusercontent.com/wiki/magento/magento2/images/maintainers.png"/>
</a>

<h3>Top Contributors</h3>
Magento is thankful for any contribution that can improve our code base, documentation or increase test coverage. We always recognize our most active members, as their contributions are the foundation of the Magento Open Source platform.
<a href="https://magento.com/magento-contributors">
<img src="https://raw.githubusercontent.com/wiki/magento/magento2/images/contributors.png"/>
</a>

<h3>Labels applied by the Magento team</h3>

| Label | Description |
Expand Down
14 changes: 12 additions & 2 deletions app/code/Magento/AdminNotification/Block/System/Messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,34 @@ class Messages extends \Magento\Backend\Block\Template

/**
* @var \Magento\Framework\Json\Helper\Data
* @deprecated
*/
protected $jsonHelper;

/**
* @var \Magento\Framework\Serialize\Serializer\Json
*/
private $serializer;

/**
* @param \Magento\Backend\Block\Template\Context $context
* @param \Magento\AdminNotification\Model\ResourceModel\System\Message\Collection\Synchronized $messages
* @param \Magento\Framework\Json\Helper\Data $jsonHelper
* @param array $data
* @param \Magento\Framework\Serialize\Serializer\Json|null $serializer
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Magento\AdminNotification\Model\ResourceModel\System\Message\Collection\Synchronized $messages,
\Magento\Framework\Json\Helper\Data $jsonHelper,
array $data = []
array $data = [],
\Magento\Framework\Serialize\Serializer\Json $serializer = null
) {
$this->jsonHelper = $jsonHelper;
parent::__construct($context, $data);
$this->_messages = $messages;
$this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance()
->get(\Magento\Framework\Serialize\Serializer\Json::class);
}

/**
Expand Down Expand Up @@ -117,7 +127,7 @@ protected function _getMessagesUrl()
*/
public function getSystemMessageDialogJson()
{
return $this->jsonHelper->jsonEncode(
return $this->serializer->serialize(
[
'systemMessageDialog' => [
'buttons' => [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ public function getPopupTitle()
$messageCount = count($this->_messages->getUnread());
if ($messageCount > 1) {
return __('You have %1 new system messages', $messageCount);
} else {
return __('You have %1 new system message', $messageCount);
}
return __('You have %1 new system message', $messageCount);
}

/**
Expand Down
3 changes: 1 addition & 2 deletions app/code/Magento/AdminNotification/Block/Window.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,9 @@ protected function _getLatestItem()
{
if ($this->_latestItem == null) {
$items = array_values($this->_criticalCollection->getItems());
$this->_latestItem = false;
if (count($items)) {
$this->_latestItem = $items[0];
} else {
$this->_latestItem = false;
}
}
return $this->_latestItem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ public function execute()
)->markAsRead(
$notificationId
);
$this->messageManager->addSuccess(__('The message has been marked as Read.'));
$this->messageManager->addSuccessMessage(__('The message has been marked as Read.'));
} catch (\Magento\Framework\Exception\LocalizedException $e) {
$this->messageManager->addError($e->getMessage());
$this->messageManager->addErrorMessage($e->getMessage());
} catch (\Exception $e) {
$this->messageManager->addException(
$this->messageManager->addExceptionMessage(
$e,
__("We couldn't mark the notification as Read because of an error.")
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function execute()
{
$ids = $this->getRequest()->getParam('notification');
if (!is_array($ids)) {
$this->messageManager->addError(__('Please select messages.'));
$this->messageManager->addErrorMessage(__('Please select messages.'));
} else {
try {
foreach ($ids as $id) {
Expand All @@ -32,13 +32,13 @@ public function execute()
$model->setIsRead(1)->save();
}
}
$this->messageManager->addSuccess(
$this->messageManager->addSuccessMessage(
__('A total of %1 record(s) have been marked as Read.', count($ids))
);
} catch (\Magento\Framework\Exception\LocalizedException $e) {
$this->messageManager->addError($e->getMessage());
$this->messageManager->addErrorMessage($e->getMessage());
} catch (\Exception $e) {
$this->messageManager->addException(
$this->messageManager->addExceptionMessage(
$e,
__("We couldn't mark the notification as Read because of an error.")
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function execute()
{
$ids = $this->getRequest()->getParam('notification');
if (!is_array($ids)) {
$this->messageManager->addError(__('Please select messages.'));
$this->messageManager->addErrorMessage(__('Please select messages.'));
} else {
try {
foreach ($ids as $id) {
Expand All @@ -32,11 +32,14 @@ public function execute()
$model->setIsRemove(1)->save();
}
}
$this->messageManager->addSuccess(__('Total of %1 record(s) have been removed.', count($ids)));
$this->messageManager->addSuccessMessage(__('Total of %1 record(s) have been removed.', count($ids)));
} catch (\Magento\Framework\Exception\LocalizedException $e) {
$this->messageManager->addError($e->getMessage());
$this->messageManager->addErrorMessage($e->getMessage());
} catch (\Exception $e) {
$this->messageManager->addException($e, __("We couldn't remove the messages because of an error."));
$this->messageManager->addExceptionMessage(
$e,
__("We couldn't remove the messages because of an error.")
);
}
}
$this->_redirect('adminhtml/*/');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ public function execute()

try {
$model->setIsRemove(1)->save();
$this->messageManager->addSuccess(__('The message has been removed.'));
$this->messageManager->addSuccessMessage(__('The message has been removed.'));
} catch (\Magento\Framework\Exception\LocalizedException $e) {
$this->messageManager->addError($e->getMessage());
$this->messageManager->addErrorMessage($e->getMessage());
} catch (\Exception $e) {
$this->messageManager->addException($e, __("We couldn't remove the messages because of an error."));
$this->messageManager->addExceptionMessage(
$e,
__("We couldn't remove the messages because of an error.")
);
}

$this->_redirect('adminhtml/*/');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
*/
namespace Magento\AdminNotification\Controller\Adminhtml\System\Message;

use Magento\Framework\Controller\ResultFactory;

class ListAction extends \Magento\Backend\App\AbstractAction
{
/**
Expand All @@ -15,6 +17,7 @@ class ListAction extends \Magento\Backend\App\AbstractAction

/**
* @var \Magento\Framework\Json\Helper\Data
* @deprecated
*/
protected $jsonHelper;

Expand All @@ -41,7 +44,7 @@ public function __construct(
}

/**
* @return void
* @return \Magento\Framework\Controller\Result\Json
*/
public function execute()
{
Expand All @@ -63,6 +66,9 @@ public function execute()
. 'Please refresh the web page to clear the notice alert.',
];
}
$this->getResponse()->representJson($this->jsonHelper->jsonEncode($result));
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
$resultJson = $this->resultFactory->create(ResultFactory::TYPE_JSON);
$resultJson->setData($result);
return $resultJson;
}
}
13 changes: 6 additions & 7 deletions app/code/Magento/AdminNotification/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
"sort-packages": true
},
"require": {
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0",
"php": "~7.1.3||~7.2.0",
"lib-libxml": "*",
"magento/framework": "100.3.*",
"magento/module-backend": "100.3.*",
"magento/module-media-storage": "100.3.*",
"magento/module-store": "100.3.*",
"magento/module-ui": "100.3.*"
"magento/framework": "*",
"magento/module-backend": "*",
"magento/module-media-storage": "*",
"magento/module-store": "*",
"magento/module-ui": "*"
},
"type": "magento2-module",
"version": "100.3.0-dev",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
Loading

0 comments on commit cb83575

Please sign in to comment.