Skip to content

Commit 7401795

Browse files
authored
Merge pull request #1 from magento/2.3-develop
update branch
2 parents 8a7f23e + eb27ac2 commit 7401795

File tree

669 files changed

+13796
-6479
lines changed

Some content is hidden

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

669 files changed

+13796
-6479
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting-edge, feature-rich eCommerce solution that gets results.
77

88
## Magento system requirements
9-
[Magento system requirements](http://devdocs.magento.com/guides/v2.3/install-gde/system-requirements2.html).
9+
[Magento system requirements](https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements2.html).
1010

1111
## Install Magento
1212

13-
* [Installation guide](http://devdocs.magento.com/guides/v2.3/install-gde/bk-install-guide.html).
13+
* [Installation guide](https://devdocs.magento.com/guides/v2.3/install-gde/bk-install-guide.html).
1414

1515
<h2>Contributing to the Magento 2 code base</h2>
1616
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.
@@ -21,10 +21,10 @@ To learn about issues, click [here][2]. To open an issue, click [here][3].
2121

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

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

2929
<h3>Community Maintainers</h3>
3030
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.
@@ -53,9 +53,9 @@ Stay up-to-date on the latest security news and patches for Magento by signing u
5353

5454
Each Magento source file included in this distribution is licensed under OSL 3.0 or the Magento Enterprise Edition (MEE) license.
5555

56-
http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
57-
Please see LICENSE.txt for the full text of the OSL 3.0 license or contact license@magentocommerce.com for a copy.
56+
[Open Software License (OSL 3.0)](https://opensource.org/licenses/osl-3.0.php).
57+
Please see [LICENSE.txt](https://github.com/magento/magento2/blob/2.3-develop/LICENSE.txt) for the full text of the OSL 3.0 license or contact license@magentocommerce.com for a copy.
5858

5959
Subject to Licensee's payment of fees and compliance with the terms and conditions of the MEE License, the MEE License supersedes the OSL 3.0 license for each source file.
60-
Please see LICENSE_EE.txt for the full text of the MEE License or visit http://magento.com/legal/terms/enterprise.
60+
Please see LICENSE_EE.txt for the full text of the MEE License or visit https://magento.com/legal/terms/enterprise.
6161

app/code/Magento/AdminNotification/Block/Window.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
namespace Magento\AdminNotification\Block;
99

1010
/**
11+
* Admin notification window block
12+
*
1113
* @api
1214
* @since 100.0.2
1315
*/
@@ -40,7 +42,7 @@ class Window extends \Magento\Backend\Block\Template
4042
protected $_criticalCollection;
4143

4244
/**
43-
* @var \Magento\Adminnotification\Model\Inbox
45+
* @var \Magento\AdminNotification\Model\Inbox
4446
*/
4547
protected $_latestItem;
4648

@@ -92,7 +94,7 @@ protected function _toHtml()
9294
/**
9395
* Retrieve latest critical item
9496
*
95-
* @return bool|\Magento\Adminnotification\Model\Inbox
97+
* @return bool|\Magento\AdminNotification\Model\Inbox
9698
*/
9799
protected function _getLatestItem()
98100
{

app/code/Magento/AdminNotification/etc/db_schema.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
default="0" comment="Flag if notification read"/>
2222
<column xsi:type="smallint" name="is_remove" padding="5" unsigned="true" nullable="false" identity="false"
2323
default="0" comment="Flag if notification might be removed"/>
24-
<constraint xsi:type="primary" name="PRIMARY">
24+
<constraint xsi:type="primary" referenceId="PRIMARY">
2525
<column name="notification_id"/>
2626
</constraint>
27-
<index name="ADMINNOTIFICATION_INBOX_SEVERITY" indexType="btree">
27+
<index referenceId="ADMINNOTIFICATION_INBOX_SEVERITY" indexType="btree">
2828
<column name="severity"/>
2929
</index>
30-
<index name="ADMINNOTIFICATION_INBOX_IS_READ" indexType="btree">
30+
<index referenceId="ADMINNOTIFICATION_INBOX_IS_READ" indexType="btree">
3131
<column name="is_read"/>
3232
</index>
33-
<index name="ADMINNOTIFICATION_INBOX_IS_REMOVE" indexType="btree">
33+
<index referenceId="ADMINNOTIFICATION_INBOX_IS_REMOVE" indexType="btree">
3434
<column name="is_remove"/>
3535
</index>
3636
</table>
@@ -40,7 +40,7 @@
4040
default="0" comment="Problem type"/>
4141
<column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
4242
comment="Create date"/>
43-
<constraint xsi:type="primary" name="PRIMARY">
43+
<constraint xsi:type="primary" referenceId="PRIMARY">
4444
<column name="identity"/>
4545
</constraint>
4646
</table>

app/code/Magento/AdvancedSearch/Model/Recommendations/DataProvider.php

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
use Magento\Search\Model\QueryInterface;
1111
use Magento\AdvancedSearch\Model\SuggestedQueriesInterface;
1212

13+
/**
14+
* Class DataProvider
15+
*/
1316
class DataProvider implements SuggestedQueriesInterface
1417
{
1518
/**
@@ -51,6 +54,8 @@ class DataProvider implements SuggestedQueriesInterface
5154
private $recommendationsFactory;
5255

5356
/**
57+
* DataProvider constructor.
58+
*
5459
* @param ScopeConfigInterface $scopeConfig
5560
* @param \Magento\Catalog\Model\Layer\Resolver $layerResolver
5661
* @param \Magento\AdvancedSearch\Model\ResourceModel\RecommendationsFactory $recommendationsFactory
@@ -69,18 +74,20 @@ public function __construct(
6974
}
7075

7176
/**
77+
* Is Results Count Enabled
78+
*
7279
* @return bool
7380
*/
7481
public function isResultsCountEnabled()
7582
{
76-
return (bool)$this->scopeConfig->getValue(
83+
return $this->scopeConfig->isSetFlag(
7784
self::CONFIG_RESULTS_COUNT_ENABLED,
7885
ScopeInterface::SCOPE_STORE
7986
);
8087
}
8188

8289
/**
83-
* {@inheritdoc}
90+
* @inheritdoc
8491
*/
8592
public function getItems(QueryInterface $query)
8693
{
@@ -102,6 +109,8 @@ public function getItems(QueryInterface $query)
102109
}
103110

104111
/**
112+
* Return Search Recommendations
113+
*
105114
* @param QueryInterface $query
106115
* @return array
107116
*/
@@ -126,17 +135,21 @@ private function getSearchRecommendations(\Magento\Search\Model\QueryInterface $
126135
}
127136

128137
/**
138+
* Is Search Recommendations Enabled
139+
*
129140
* @return bool
130141
*/
131142
private function isSearchRecommendationsEnabled()
132143
{
133-
return (bool)$this->scopeConfig->getValue(
144+
return $this->scopeConfig->isSetFlag(
134145
self::CONFIG_IS_ENABLED,
135146
ScopeInterface::SCOPE_STORE
136147
);
137148
}
138149

139150
/**
151+
* Return Search Recommendations Count
152+
*
140153
* @return int
141154
*/
142155
private function getSearchRecommendationsCount()

app/code/Magento/AdvancedSearch/etc/db_schema.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
default="0" comment="Query Id"/>
1515
<column xsi:type="int" name="relation_id" padding="10" unsigned="true" nullable="false" identity="false"
1616
default="0" comment="Relation Id"/>
17-
<constraint xsi:type="primary" name="PRIMARY">
17+
<constraint xsi:type="primary" referenceId="PRIMARY">
1818
<column name="id"/>
1919
</constraint>
20-
<constraint xsi:type="foreign" name="CATALOGSEARCH_RECOMMENDATIONS_QUERY_ID_SEARCH_QUERY_QUERY_ID"
20+
<constraint xsi:type="foreign" referenceId="CATALOGSEARCH_RECOMMENDATIONS_QUERY_ID_SEARCH_QUERY_QUERY_ID"
2121
table="catalogsearch_recommendations" column="query_id" referenceTable="search_query"
2222
referenceColumn="query_id" onDelete="CASCADE"/>
23-
<constraint xsi:type="foreign" name="CATALOGSEARCH_RECOMMENDATIONS_RELATION_ID_SEARCH_QUERY_QUERY_ID"
23+
<constraint xsi:type="foreign" referenceId="CATALOGSEARCH_RECOMMENDATIONS_RELATION_ID_SEARCH_QUERY_QUERY_ID"
2424
table="catalogsearch_recommendations" column="relation_id" referenceTable="search_query"
2525
referenceColumn="query_id" onDelete="CASCADE"/>
2626
</table>

app/code/Magento/AsynchronousOperations/etc/db_schema.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
comment="Total number of operations scheduled within this bulk"/>
2222
<column xsi:type="timestamp" name="start_time" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
2323
comment="Bulk start time"/>
24-
<constraint xsi:type="primary" name="PRIMARY">
24+
<constraint xsi:type="primary" referenceId="PRIMARY">
2525
<column name="id"/>
2626
</constraint>
27-
<constraint xsi:type="unique" name="MAGENTO_BULK_UUID">
27+
<constraint xsi:type="unique" referenceId="MAGENTO_BULK_UUID">
2828
<column name="uuid"/>
2929
</constraint>
30-
<index name="MAGENTO_BULK_USER_ID_ADMIN_USER_USER_ID" indexType="btree">
30+
<index referenceId="MAGENTO_BULK_USER_ID_ADMIN_USER_USER_ID" indexType="btree">
3131
<column name="user_id"/>
3232
</index>
3333
</table>
@@ -47,12 +47,12 @@
4747
comment="Code of the error that appeared during operation execution (used to aggregate related failed operations)"/>
4848
<column xsi:type="varchar" name="result_message" nullable="true" length="255"
4949
comment="Operation result message"/>
50-
<constraint xsi:type="primary" name="PRIMARY">
50+
<constraint xsi:type="primary" referenceId="PRIMARY">
5151
<column name="id"/>
5252
</constraint>
53-
<constraint xsi:type="foreign" name="MAGENTO_OPERATION_BULK_UUID_MAGENTO_BULK_UUID" table="magento_operation"
53+
<constraint xsi:type="foreign" referenceId="MAGENTO_OPERATION_BULK_UUID_MAGENTO_BULK_UUID" table="magento_operation"
5454
column="bulk_uuid" referenceTable="magento_bulk" referenceColumn="uuid" onDelete="CASCADE"/>
55-
<index name="MAGENTO_OPERATION_BULK_UUID_ERROR_CODE" indexType="btree">
55+
<index referenceId="MAGENTO_OPERATION_BULK_UUID_ERROR_CODE" indexType="btree">
5656
<column name="bulk_uuid"/>
5757
<column name="error_code"/>
5858
</index>
@@ -62,13 +62,13 @@
6262
<column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"
6363
comment="Internal ID"/>
6464
<column xsi:type="varbinary" name="bulk_uuid" nullable="true" length="39" comment="Related Bulk UUID"/>
65-
<constraint xsi:type="primary" name="PRIMARY">
65+
<constraint xsi:type="primary" referenceId="PRIMARY">
6666
<column name="id"/>
6767
</constraint>
68-
<constraint xsi:type="foreign" name="MAGENTO_ACKNOWLEDGED_BULK_BULK_UUID_MAGENTO_BULK_UUID"
68+
<constraint xsi:type="foreign" referenceId="MAGENTO_ACKNOWLEDGED_BULK_BULK_UUID_MAGENTO_BULK_UUID"
6969
table="magento_acknowledged_bulk" column="bulk_uuid" referenceTable="magento_bulk"
7070
referenceColumn="uuid" onDelete="CASCADE"/>
71-
<constraint xsi:type="unique" name="MAGENTO_ACKNOWLEDGED_BULK_BULK_UUID">
71+
<constraint xsi:type="unique" referenceId="MAGENTO_ACKNOWLEDGED_BULK_BULK_UUID">
7272
<column name="bulk_uuid"/>
7373
</constraint>
7474
</table>

app/code/Magento/AsynchronousOperations/etc/db_schema_whitelist.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
},
1616
"constraint": {
1717
"PRIMARY": true,
18-
"MAGENTO_BULK_UUID": true
18+
"MAGENTO_BULK_UUID": true,
19+
"MAGENTO_BULK_USER_ID_ADMIN_USER_USER_ID": true
1920
}
2021
},
2122
"magento_operation": {

app/code/Magento/Authorization/etc/db_schema.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
comment="User ID"/>
2222
<column xsi:type="varchar" name="user_type" nullable="true" length="16" comment="User Type"/>
2323
<column xsi:type="varchar" name="role_name" nullable="true" length="50" comment="Role Name"/>
24-
<constraint xsi:type="primary" name="PRIMARY">
24+
<constraint xsi:type="primary" referenceId="PRIMARY">
2525
<column name="role_id"/>
2626
</constraint>
27-
<index name="AUTHORIZATION_ROLE_PARENT_ID_SORT_ORDER" indexType="btree">
27+
<index referenceId="AUTHORIZATION_ROLE_PARENT_ID_SORT_ORDER" indexType="btree">
2828
<column name="parent_id"/>
2929
<column name="sort_order"/>
3030
</index>
31-
<index name="AUTHORIZATION_ROLE_TREE_LEVEL" indexType="btree">
31+
<index referenceId="AUTHORIZATION_ROLE_TREE_LEVEL" indexType="btree">
3232
<column name="tree_level"/>
3333
</index>
3434
</table>
@@ -40,17 +40,17 @@
4040
<column xsi:type="varchar" name="resource_id" nullable="true" length="255" comment="Resource ID"/>
4141
<column xsi:type="varchar" name="privileges" nullable="true" length="20" comment="Privileges"/>
4242
<column xsi:type="varchar" name="permission" nullable="true" length="10" comment="Permission"/>
43-
<constraint xsi:type="primary" name="PRIMARY">
43+
<constraint xsi:type="primary" referenceId="PRIMARY">
4444
<column name="rule_id"/>
4545
</constraint>
46-
<constraint xsi:type="foreign" name="AUTHORIZATION_RULE_ROLE_ID_AUTHORIZATION_ROLE_ROLE_ID"
46+
<constraint xsi:type="foreign" referenceId="AUTHORIZATION_RULE_ROLE_ID_AUTHORIZATION_ROLE_ROLE_ID"
4747
table="authorization_rule" column="role_id" referenceTable="authorization_role"
4848
referenceColumn="role_id" onDelete="CASCADE"/>
49-
<index name="AUTHORIZATION_RULE_RESOURCE_ID_ROLE_ID" indexType="btree">
49+
<index referenceId="AUTHORIZATION_RULE_RESOURCE_ID_ROLE_ID" indexType="btree">
5050
<column name="resource_id"/>
5151
<column name="role_id"/>
5252
</index>
53-
<index name="AUTHORIZATION_RULE_ROLE_ID_RESOURCE_ID" indexType="btree">
53+
<index referenceId="AUTHORIZATION_RULE_ROLE_ID_RESOURCE_ID" indexType="btree">
5454
<column name="role_id"/>
5555
<column name="resource_id"/>
5656
</index>

app/code/Magento/Backend/Model/Config/SessionLifetime/BackendModel.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@
1616
*/
1717
class BackendModel extends Value
1818
{
19-
/** Maximum dmin session lifetime; 1 year*/
19+
/** Maximum admin session lifetime; 1 year*/
2020
const MAX_LIFETIME = 31536000;
2121

2222
/** Minimum admin session lifetime */
2323
const MIN_LIFETIME = 60;
2424

2525
/**
26+
* Processing object before save data
27+
*
2628
* @since 100.1.0
29+
* @throws LocalizedException
2730
*/
2831
public function beforeSave()
2932
{
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Backend\Test\Unit\Service\V1;
9+
10+
use Magento\Backend\Service\V1\ModuleService;
11+
use Magento\Framework\Module\ModuleListInterface;
12+
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
13+
14+
/**
15+
* Module List Service Test
16+
*
17+
* Covers \Magento\Sales\Model\ValidatorResultMerger
18+
*/
19+
class ModuleServiceTest extends \PHPUnit\Framework\TestCase
20+
{
21+
/**
22+
* Testable Object
23+
*
24+
* @var ModuleService
25+
*/
26+
private $moduleService;
27+
28+
/**
29+
* @var ModuleListInterface|\PHPUnit_Framework_MockObject_MockObject
30+
*/
31+
private $moduleListMock;
32+
33+
/**
34+
* Object Manager
35+
*
36+
* @var ObjectManager
37+
*/
38+
private $objectManager;
39+
40+
/**
41+
* Set Up
42+
*
43+
* @return void
44+
*/
45+
protected function setUp()
46+
{
47+
$this->moduleListMock = $this->createMock(ModuleListInterface::class);
48+
$this->objectManager = new ObjectManager($this);
49+
$this->moduleService = $this->objectManager->getObject(
50+
ModuleService::class,
51+
[
52+
'moduleList' => $this->moduleListMock,
53+
]
54+
);
55+
}
56+
57+
/**
58+
* Test getModules method
59+
*
60+
* @return void
61+
*/
62+
public function testGetModules()
63+
{
64+
$moduleNames = ['Magento_Backend', 'Magento_Catalog', 'Magento_Customer'];
65+
$this->moduleListMock->expects($this->once())->method('getNames')->willReturn($moduleNames);
66+
67+
$expected = $moduleNames;
68+
$actual = $this->moduleService->getModules();
69+
$this->assertEquals($expected, $actual);
70+
}
71+
}

0 commit comments

Comments
 (0)