Skip to content

Commit

Permalink
MAGETWO-71670: Fix issue #10565 #10575
Browse files Browse the repository at this point in the history
 - Merge Pull Request #10575 from thlassche/magento2:develop
 - Merged commits:
   1. c0f9508
   2. de4dbe1
   3. 9e263a8
   4. 02c018d
  • Loading branch information
ishakhsuvarov committed Aug 18, 2017
2 parents d844e31 + 02c018d commit fcb90c9
Show file tree
Hide file tree
Showing 12,304 changed files with 122,650 additions and 90,063 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/.metadata
/.project
/.settings
/.vscode
atlassian*
/nbproject
/robots.txt
Expand Down
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
sudo: required
dist: trusty
group: edge
addons:
apt:
packages:
Expand Down Expand Up @@ -58,5 +59,6 @@ script:
- test $TEST_SUITE = "functional" && TEST_FILTER='dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php' || true

# The scripts for grunt/phpunit type tests
- if [ $TEST_SUITE != "js" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
- if [ $TEST_SUITE == "functional" ]; then dev/tests/functional/vendor/phpunit/phpunit/phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
- if [ $TEST_SUITE != "functional" ] && [ $TEST_SUITE != "js" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
- if [ $TEST_SUITE == "js" ]; then grunt $GRUNT_COMMAND; fi
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
4 changes: 2 additions & 2 deletions app/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@
date_default_timezone_set('UTC');

/* Adjustment of precision value for several versions of PHP */
ini_set('precision', 17);
ini_set('serialize_precision', 17);
ini_set('precision', 15);
ini_set('serialize_precision', 15);
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

namespace Magento\AdminNotification\Block\Grid\Renderer;

/**
* Class \Magento\AdminNotification\Block\Grid\Renderer\Actions
*
*/
class Actions extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
*/
namespace Magento\AdminNotification\Block\Grid\Renderer;

/**
* Class \Magento\AdminNotification\Block\Grid\Renderer\Notice
*
*/
class Notice extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

use Magento\Framework\Notification\MessageInterface;

/**
* Class \Magento\AdminNotification\Block\Grid\Renderer\Severity
*
*/
class Severity extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
{
/**
Expand Down
4 changes: 4 additions & 0 deletions app/code/Magento/AdminNotification/Block/System/Messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
*/
namespace Magento\AdminNotification\Block\System;

/**
* Class \Magento\AdminNotification\Block\System\Messages
*
*/
class Messages extends \Magento\Backend\Block\Template
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
*/
namespace Magento\AdminNotification\Controller\Adminhtml;

/**
* @api
*/
abstract class Notification extends \Magento\Backend\App\AbstractAction
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,35 @@
*/
namespace Magento\AdminNotification\Controller\Adminhtml\Notification;

use Magento\Backend\App\Action;
use Magento\Framework\Controller\ResultFactory;

class AjaxMarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Notification
{
/**
* @var \Magento\AdminNotification\Model\NotificationService
*/
private $notificationService;

/**
* @param Action\Context $context
* @param \Magento\AdminNotification\Model\NotificationService|null $notificationService
* @throws \RuntimeException
*/
public function __construct(
Action\Context $context,
\Magento\AdminNotification\Model\NotificationService $notificationService = null
) {
parent::__construct($context);
$this->notificationService = $notificationService?: \Magento\Framework\App\ObjectManager::getInstance()
->get(\Magento\AdminNotification\Model\NotificationService::class);
}

/**
* Mark notification as read (AJAX action)
*
* @return void
* @return \Magento\Framework\Controller\Result\Json|void
* @throws \InvalidArgumentException
*/
public function execute()
{
Expand All @@ -21,17 +44,15 @@ public function execute()
$notificationId = (int)$this->getRequest()->getPost('id');
$responseData = [];
try {
$this->_objectManager->create(
\Magento\AdminNotification\Model\NotificationService::class
)->markAsRead(
$notificationId
);
$this->notificationService->markAsRead($notificationId);
$responseData['success'] = true;
} catch (\Exception $e) {
$responseData['success'] = false;
}
$this->getResponse()->representJson(
$this->_objectManager->create(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($responseData)
);

/** @var \Magento\Framework\Controller\Result\Json $resultJson */
$resultJson = $this->resultFactory->create(ResultFactory::TYPE_JSON);
$resultJson->setData($responseData);
return $resultJson;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
*/
namespace Magento\AdminNotification\Controller\Adminhtml\Notification;

/**
* Class \Magento\AdminNotification\Controller\Adminhtml\Notification\Index
*
*/
class Index extends \Magento\AdminNotification\Controller\Adminhtml\Notification
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
*/
namespace Magento\AdminNotification\Controller\Adminhtml\Notification;

/**
* Class \Magento\AdminNotification\Controller\Adminhtml\Notification\MarkAsRead
*
*/
class MarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Notification
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
*/
namespace Magento\AdminNotification\Controller\Adminhtml\Notification;

/**
* Class \Magento\AdminNotification\Controller\Adminhtml\Notification\MassMarkAsRead
*
*/
class MassMarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Notification
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
*/
namespace Magento\AdminNotification\Controller\Adminhtml\Notification;

/**
* Class \Magento\AdminNotification\Controller\Adminhtml\Notification\MassRemove
*
*/
class MassRemove extends \Magento\AdminNotification\Controller\Adminhtml\Notification
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
*/
namespace Magento\AdminNotification\Controller\Adminhtml\Notification;

/**
* Class \Magento\AdminNotification\Controller\Adminhtml\Notification\Remove
*
*/
class Remove extends \Magento\AdminNotification\Controller\Adminhtml\Notification
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
*/
namespace Magento\AdminNotification\Controller\Adminhtml\System\Message;

/**
* Class \Magento\AdminNotification\Controller\Adminhtml\System\Message\ListAction
*
*/
class ListAction extends \Magento\Backend\App\AbstractAction
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* AdminNotification update frequency source
*
* @codeCoverageIgnore
* @api
*/
class Frequency implements \Magento\Framework\Option\ArrayInterface
{
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/AdminNotification/Model/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*
* @author Magento Core Team <[email protected]>
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @api
*/
class Feed extends \Magento\Framework\Model\AbstractModel
{
Expand Down
4 changes: 1 addition & 3 deletions app/code/Magento/AdminNotification/Model/Inbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
/**
* AdminNotification Inbox model
*
* @method \Magento\AdminNotification\Model\ResourceModel\Inbox _getResource()
* @method \Magento\AdminNotification\Model\ResourceModel\Inbox getResource()
* @method int getSeverity()
* @method \Magento\AdminNotification\Model\Inbox setSeverity(int $value)
* @method string getDateAdded()
Expand All @@ -29,7 +27,7 @@
* @method int getIsRemove()
* @method \Magento\AdminNotification\Model\Inbox setIsRemove(int $value)
*
* @author Magento Core Team <[email protected]>
* @api
*/
class Inbox extends \Magento\Framework\Model\AbstractModel implements NotifierInterface, InboxInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* AdminNotification Inbox interface
*
* @author Magento Core Team <[email protected]>
* @api
*/
interface InboxInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* Notification service model
*
* @author Magento Core Team <[email protected]>
* @api
*/
class NotificationService
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
*/
namespace Magento\AdminNotification\Model\ResourceModel\Grid;

/**
* @api
*/
class Collection extends \Magento\AdminNotification\Model\ResourceModel\Inbox\Collection
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
namespace Magento\AdminNotification\Model\ResourceModel;

/**
* AdminNotification Inbox model
*
* @author Magento Core Team <[email protected]>
* @api
*/
class Inbox extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*
* @api
* @author Magento Core Team <[email protected]>
* @api
*/
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
*/
namespace Magento\AdminNotification\Model\ResourceModel\Inbox\Collection;

/**
* @api
*/
class Critical extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
*/
namespace Magento\AdminNotification\Model\ResourceModel\Inbox\Collection;

/**
* @api
*/
class Unread extends \Magento\AdminNotification\Model\ResourceModel\Inbox\Collection
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*/
namespace Magento\AdminNotification\Model\ResourceModel\System;

/**
* @api
*/
class Message extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*/
namespace Magento\AdminNotification\Model\ResourceModel\System\Message;

/**
* @api
*/
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*/
namespace Magento\AdminNotification\Model\ResourceModel\System\Message\Collection;

/**
* @api
*/
class Synchronized extends \Magento\AdminNotification\Model\ResourceModel\System\Message\Collection
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

/**
* @codeCoverageIgnore
* @api
*/
class Message extends \Magento\Framework\Model\AbstractModel implements \Magento\Framework\Notification\MessageInterface
{
Expand Down
Loading

0 comments on commit fcb90c9

Please sign in to comment.