Skip to content

Commit cc3c5da

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into develop
2 parents 88bfbd5 + 308da7d commit cc3c5da

File tree

7,067 files changed

+76809
-44115
lines changed

Some content is hidden

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

7,067 files changed

+76809
-44115
lines changed

.htaccess

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -32,34 +32,6 @@
3232

3333
DirectoryIndex index.php
3434

35-
<IfModule mod_php5.c>
36-
37-
############################################
38-
## adjust memory limit
39-
40-
php_value memory_limit 768M
41-
php_value max_execution_time 18000
42-
43-
############################################
44-
## disable automatic session start
45-
## before autoload was initialized
46-
47-
php_flag session.auto_start off
48-
49-
############################################
50-
## enable resulting html compression
51-
52-
#php_flag zlib.output_compression on
53-
54-
###########################################
55-
## disable user agent verification to not break multiple image upload
56-
57-
php_flag suhosin.session.cryptua off
58-
59-
</IfModule>
60-
61-
<IfModule mod_php7.c>
62-
6335
############################################
6436
## adjust memory limit
6537

@@ -82,8 +54,6 @@
8254

8355
php_flag suhosin.session.cryptua off
8456

85-
</IfModule>
86-
8757
<IfModule mod_security.c>
8858
###########################################
8959
## disable POST processing to not break multiple image upload

.htaccess.sample

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -32,34 +32,6 @@
3232

3333
DirectoryIndex index.php
3434

35-
<IfModule mod_php5.c>
36-
37-
############################################
38-
## adjust memory limit
39-
40-
php_value memory_limit 768M
41-
php_value max_execution_time 18000
42-
43-
############################################
44-
## disable automatic session start
45-
## before autoload was initialized
46-
47-
php_flag session.auto_start off
48-
49-
############################################
50-
## enable resulting html compression
51-
52-
#php_flag zlib.output_compression on
53-
54-
###########################################
55-
## disable user agent verification to not break multiple image upload
56-
57-
php_flag suhosin.session.cryptua off
58-
59-
</IfModule>
60-
61-
<IfModule mod_php7.c>
62-
6335
############################################
6436
## adjust memory limit
6537

@@ -82,8 +54,6 @@
8254

8355
php_flag suhosin.session.cryptua off
8456

85-
</IfModule>
86-
8757
<IfModule mod_security.c>
8858
###########################################
8959
## disable POST processing to not break multiple image upload

ISSUE_TEMPLATE.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
1-
Steps to reproduce
2-
--
3-
1. Install Magento from `develop` branch.
4-
2. [Example] Add Configurable Product to the cart.
5-
3. ...
1+
<!--- Provide a general summary of the issue in the Title above -->
2+
<!--- Before adding new issues, please, check this article https://github.com/magento/magento2/wiki/Issue-reporting-guidelines-->
63

7-
Expected result
8-
--
9-
1. [Example] Configurable product added to the shopping cart.
10-
2. ...
4+
### Preconditions
5+
<!--- Provide a more detailed information of environment you use -->
6+
<!--- Magento version, tag, HEAD, etc., PHP & MySQL version, etc.. -->
7+
1.
8+
2.
119

12-
Actual result
13-
--
14-
1. [Example] Error message appears: "Cannot save quote".
15-
2. [Screenshot, logs]
16-
3. ...
10+
### Steps to reproduce
11+
<!--- Provide a set of unambiguous steps to reproduce this bug include code, if relevant -->
12+
1.
13+
2.
14+
3.
15+
16+
### Expected result
17+
<!--- Tell us what should happen -->
18+
1.
19+
20+
### Actual result
21+
<!--- Tell us what happens instead -->
22+
1. [Screenshot, logs]
23+
24+
<!--- (This may be platform independent comment) -->

app/code/Magento/AdminNotification/Block/Grid/Renderer/Notice.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ class Notice extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abstract
1818
public function render(\Magento\Framework\DataObject $row)
1919
{
2020
return '<span class="grid-row-title">' .
21-
$row->getTitle() .
21+
$this->escapeHtml($row->getTitle()) .
2222
'</span>' .
23-
($row->getDescription() ? '<br />' .
24-
$row->getDescription() : '');
23+
($row->getDescription() ? '<br />' . $this->escapeHtml($row->getDescription()) : '');
2524
}
2625
}

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/AjaxMarkAsRead.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function execute()
2222
$responseData = [];
2323
try {
2424
$this->_objectManager->create(
25-
'Magento\AdminNotification\Model\NotificationService'
25+
\Magento\AdminNotification\Model\NotificationService::class
2626
)->markAsRead(
2727
$notificationId
2828
);
@@ -31,7 +31,7 @@ public function execute()
3131
$responseData['success'] = false;
3232
}
3333
$this->getResponse()->representJson(
34-
$this->_objectManager->create('Magento\Framework\Json\Helper\Data')->jsonEncode($responseData)
34+
$this->_objectManager->create(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($responseData)
3535
);
3636
}
3737
}

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/MarkAsRead.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function execute()
2424
if ($notificationId) {
2525
try {
2626
$this->_objectManager->create(
27-
'Magento\AdminNotification\Model\NotificationService'
27+
\Magento\AdminNotification\Model\NotificationService::class
2828
)->markAsRead(
2929
$notificationId
3030
);

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/MassMarkAsRead.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function execute()
2727
} else {
2828
try {
2929
foreach ($ids as $id) {
30-
$model = $this->_objectManager->create('Magento\AdminNotification\Model\Inbox')->load($id);
30+
$model = $this->_objectManager->create(\Magento\AdminNotification\Model\Inbox::class)->load($id);
3131
if ($model->getId()) {
3232
$model->setIsRead(1)->save();
3333
}

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/MassRemove.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function execute()
2727
} else {
2828
try {
2929
foreach ($ids as $id) {
30-
$model = $this->_objectManager->create('Magento\AdminNotification\Model\Inbox')->load($id);
30+
$model = $this->_objectManager->create(\Magento\AdminNotification\Model\Inbox::class)->load($id);
3131
if ($model->getId()) {
3232
$model->setIsRemove(1)->save();
3333
}

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/Remove.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Remove extends \Magento\AdminNotification\Controller\Adminhtml\Notificatio
2222
public function execute()
2323
{
2424
if ($id = $this->getRequest()->getParam('id')) {
25-
$model = $this->_objectManager->create('Magento\AdminNotification\Model\Inbox')->load($id);
25+
$model = $this->_objectManager->create(\Magento\AdminNotification\Model\Inbox::class)->load($id);
2626

2727
if (!$model->getId()) {
2828
$this->_redirect('adminhtml/*/');

app/code/Magento/AdminNotification/Model/Inbox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Inbox extends \Magento\Framework\Model\AbstractModel implements NotifierIn
3838
*/
3939
protected function _construct()
4040
{
41-
$this->_init('Magento\AdminNotification\Model\ResourceModel\Inbox');
41+
$this->_init(\Magento\AdminNotification\Model\ResourceModel\Inbox::class);
4242
}
4343

4444
/**

app/code/Magento/AdminNotification/Model/ResourceModel/Inbox/Collection.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\Ab
1919
*/
2020
protected function _construct()
2121
{
22-
$this->_init('Magento\AdminNotification\Model\Inbox', 'Magento\AdminNotification\Model\ResourceModel\Inbox');
22+
$this->_init(
23+
\Magento\AdminNotification\Model\Inbox::class,
24+
\Magento\AdminNotification\Model\ResourceModel\Inbox::class
25+
);
2326
}
2427

2528
/**

app/code/Magento/AdminNotification/Model/ResourceModel/Inbox/Collection/Critical.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ class Critical extends \Magento\Framework\Model\ResourceModel\Db\Collection\Abst
1616
*/
1717
protected function _construct()
1818
{
19-
$this->_init('Magento\AdminNotification\Model\Inbox', 'Magento\AdminNotification\Model\ResourceModel\Inbox');
19+
$this->_init(
20+
\Magento\AdminNotification\Model\Inbox::class,
21+
\Magento\AdminNotification\Model\ResourceModel\Inbox::class
22+
);
2023
}
2124

2225
/**

app/code/Magento/AdminNotification/Model/ResourceModel/System/Message/Collection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public function __construct(
5151
protected function _construct()
5252
{
5353
$this->_init(
54-
'Magento\AdminNotification\Model\System\Message',
55-
'Magento\AdminNotification\Model\ResourceModel\System\Message'
54+
\Magento\AdminNotification\Model\System\Message::class,
55+
\Magento\AdminNotification\Model\ResourceModel\System\Message::class
5656
);
5757
}
5858

app/code/Magento/AdminNotification/Model/System/Message.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Message extends \Magento\Framework\Model\AbstractModel implements \Magento
1515
*/
1616
protected function _construct()
1717
{
18-
$this->_init('Magento\AdminNotification\Model\ResourceModel\System\Message');
18+
$this->_init(\Magento\AdminNotification\Model\ResourceModel\System\Message::class);
1919
}
2020

2121
/**

app/code/Magento/AdminNotification/Test/Unit/Block/ToolbarEntryTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected function _getBlockInstance($unreadNotifications)
2424
$objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
2525
// mock collection of unread notifications
2626
$notificationList = $this->getMock(
27-
'Magento\AdminNotification\Model\ResourceModel\Inbox\Collection\Unread',
27+
\Magento\AdminNotification\Model\ResourceModel\Inbox\Collection\Unread::class,
2828
['getSize', 'setCurPage', 'setPageSize'],
2929
[],
3030
'',
@@ -33,7 +33,7 @@ protected function _getBlockInstance($unreadNotifications)
3333
$notificationList->expects($this->any())->method('getSize')->will($this->returnValue($unreadNotifications));
3434

3535
$block = $objectManagerHelper->getObject(
36-
'Magento\AdminNotification\Block\ToolbarEntry',
36+
\Magento\AdminNotification\Block\ToolbarEntry::class,
3737
['notificationList' => $notificationList]
3838
);
3939

@@ -52,12 +52,14 @@ public function testGetLatestUnreadNotifications()
5252
$helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
5353

5454
// 1. Create mocks
55-
$notificationList = $this->getMockBuilder('Magento\AdminNotification\Model\ResourceModel\Inbox\Collection\Unread')
55+
$notificationList = $this->getMockBuilder(
56+
\Magento\AdminNotification\Model\ResourceModel\Inbox\Collection\Unread::class)
5657
->disableOriginalConstructor()
5758
->getMock();
5859

5960
/** @var \Magento\AdminNotification\Block\ToolbarEntry $model */
60-
$model = $helper->getObject('Magento\AdminNotification\Block\ToolbarEntry',
61+
$model = $helper->getObject(
62+
\Magento\AdminNotification\Block\ToolbarEntry::class,
6163
['notificationList' => $notificationList]
6264
);
6365

app/code/Magento/AdminNotification/Test/Unit/Model/FeedTest.php

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,25 @@ class FeedTest extends \PHPUnit_Framework_TestCase
5252

5353
protected function setUp()
5454
{
55-
$this->inboxFactory = $this->getMock('Magento\AdminNotification\Model\InboxFactory', ['create'], [], '', false);
56-
$this->curlFactory = $this->getMock('Magento\Framework\HTTP\Adapter\CurlFactory', ['create'], [], '', false);
57-
$this->curl = $this->getMockBuilder('Magento\Framework\HTTP\Adapter\Curl')
55+
$this->inboxFactory = $this->getMock(
56+
\Magento\AdminNotification\Model\InboxFactory::class,
57+
['create'],
58+
[],
59+
'',
60+
false
61+
);
62+
$this->curlFactory = $this->getMock(
63+
\Magento\Framework\HTTP\Adapter\CurlFactory::class,
64+
['create'],
65+
[],
66+
'',
67+
false
68+
);
69+
$this->curl = $this->getMockBuilder(\Magento\Framework\HTTP\Adapter\Curl::class)
5870
->disableOriginalConstructor()->getMock();
59-
$this->appState = $this->getMock('Magento\Framework\App\State', ['getInstallDate'], [], '', false);
71+
$this->appState = $this->getMock(\Magento\Framework\App\State::class, ['getInstallDate'], [], '', false);
6072
$this->inboxModel = $this->getMock(
61-
'Magento\AdminNotification\Model\Inbox',
73+
\Magento\AdminNotification\Model\Inbox::class,
6274
[
6375
'__wakeup',
6476
'parse'
@@ -68,15 +80,15 @@ protected function setUp()
6880
false
6981
);
7082
$this->backendConfig = $this->getMock(
71-
'Magento\Backend\App\ConfigInterface',
83+
\Magento\Backend\App\ConfigInterface::class,
7284
[
7385
'getValue',
7486
'setValue',
7587
'isSetFlag'
7688
]
7789
);
7890
$this->cacheManager = $this->getMock(
79-
'Magento\Framework\App\CacheInterface',
91+
\Magento\Framework\App\CacheInterface::class,
8092
[
8193
'load',
8294
'getFrontend',
@@ -86,18 +98,18 @@ protected function setUp()
8698
]
8799
);
88100

89-
$this->deploymentConfig = $this->getMockBuilder('Magento\Framework\App\DeploymentConfig')
101+
$this->deploymentConfig = $this->getMockBuilder(\Magento\Framework\App\DeploymentConfig::class)
90102
->disableOriginalConstructor()->getMock();
91103

92104
$this->objectManagerHelper = new ObjectManagerHelper($this);
93105

94-
$this->productMetadata = $this->getMockBuilder('Magento\Framework\App\ProductMetadata')
106+
$this->productMetadata = $this->getMockBuilder(\Magento\Framework\App\ProductMetadata::class)
95107
->disableOriginalConstructor()->getMock();
96108

97-
$this->urlBuilder = $this->getMock('Magento\Framework\UrlInterface');
109+
$this->urlBuilder = $this->getMock(\Magento\Framework\UrlInterface::class);
98110

99111
$this->feed = $this->objectManagerHelper->getObject(
100-
'Magento\AdminNotification\Model\Feed',
112+
\Magento\AdminNotification\Model\Feed::class,
101113
[
102114
'backendConfig' => $this->backendConfig,
103115
'cacheManager' => $this->cacheManager,

app/code/Magento/AdminNotification/Test/Unit/Model/NotificationServiceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ protected function _getServiceInstanceForMarkAsReadTest($notificationId)
2424
* $notificationFactory \PHPUnit_Framework_MockObject_MockObject|\Magento\AdminNotification\Model\InboxFactory
2525
*/
2626
$notificationFactory = $this->getMock(
27-
'Magento\AdminNotification\Model\InboxFactory',
27+
\Magento\AdminNotification\Model\InboxFactory::class,
2828
['create'],
2929
[],
3030
'',
3131
false
3232
);
3333
$notification = $this->getMock(
34-
'Magento\AdminNotification\Model\Inbox',
34+
\Magento\AdminNotification\Model\Inbox::class,
3535
['load', 'getId', 'save', 'setIsRead', '__sleep', '__wakeup'],
3636
[],
3737
'',

0 commit comments

Comments
 (0)