Skip to content

Commit b6cf9bb

Browse files
author
Volodymyr Kublytskyi
committed
Merge remote-tracking branch 'mainline/2.3-develop'
2 parents 2e374a6 + 0f61d2d commit b6cf9bb

File tree

764 files changed

+13018
-2999
lines changed

Some content is hidden

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

764 files changed

+13018
-2999
lines changed

.php_cs.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
*/
66

77
/**
8-
* Pre-commit hook installation:
9-
* vendor/bin/static-review.php hook:install dev/tools/Magento/Tools/StaticReview/pre-commit .git/hooks/pre-commit
8+
* PHP Coding Standards fixer configuration
109
*/
10+
1111
$finder = PhpCsFixer\Finder::create()
1212
->name('*.phtml')
1313
->exclude('dev/tests/functional/generated')

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/magento/magento2.svg?branch=develop)](https://travis-ci.org/magento/magento2)
1+
[![Build Status](https://travis-ci.org/magento/magento2.svg?branch=2.3-develop)](https://travis-ci.org/magento/magento2)
22
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/magento/magento2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
33
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/magento-2/localized.png)](https://crowdin.com/project/magento-2)
44
<h2>Welcome</h2>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="urn:magento:setup:Model/Declaration/Schema/etc/schema.xsd">
9+
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
1010
<table name="adminnotification_inbox" resource="default" engine="innodb" comment="Adminnotification Inbox">
1111
<column xsi:type="int" name="notification_id" padding="10" unsigned="true" nullable="false" identity="true"
1212
comment="Notification id"/>

app/code/Magento/Analytics/Block/Adminhtml/System/Config/CollectionTimeLabel.php

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,45 @@
55
*/
66
namespace Magento\Analytics\Block\Adminhtml\System\Config;
77

8+
use Magento\Framework\App\ObjectManager;
9+
810
/**
911
* Provides label with default Time Zone
1012
*/
1113
class CollectionTimeLabel extends \Magento\Config\Block\System\Config\Form\Field
1214
{
1315
/**
14-
* Add default time zone to comment
16+
* @var \Magento\Framework\Locale\ResolverInterface
17+
*/
18+
private $localeResolver;
19+
20+
/**
21+
* @param \Magento\Backend\Block\Template\Context $context
22+
* @param array $data
23+
* @param \Magento\Framework\Locale\ResolverInterface|null $localeResolver
24+
*/
25+
public function __construct(
26+
\Magento\Backend\Block\Template\Context $context,
27+
array $data = [],
28+
\Magento\Framework\Locale\ResolverInterface $localeResolver = null
29+
) {
30+
$this->localeResolver = $localeResolver ?:
31+
ObjectManager::getInstance()->get(\Magento\Framework\Locale\ResolverInterface::class);
32+
parent::__construct($context, $data);
33+
}
34+
35+
/**
36+
* Add current time zone to comment, properly translated according to locale
1537
*
1638
* @param \Magento\Framework\Data\Form\Element\AbstractElement $element
1739
* @return string
1840
*/
1941
public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element)
2042
{
2143
$timeZoneCode = $this->_localeDate->getConfigTimezone();
22-
$getLongTimeZoneName = \IntlTimeZone::createTimeZone($timeZoneCode)->getDisplayName();
44+
$locale = $this->localeResolver->getLocale();
45+
$getLongTimeZoneName = \IntlTimeZone::createTimeZone($timeZoneCode)
46+
->getDisplayName(false, \IntlTimeZone::DISPLAY_LONG, $locale);
2347
$element->setData(
2448
'comment',
2549
sprintf("%s (%s)", $getLongTimeZoneName, $timeZoneCode)

app/code/Magento/Analytics/Setup/Patch/Data/PrepareInitialConfig.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
namespace Magento\Analytics\Setup\Patch\Data;
88

99
use Magento\Analytics\Model\Config\Backend\Enabled\SubscriptionHandler;
10-
use Magento\Framework\App\ResourceConnection;
1110
use Magento\Framework\Setup\ModuleDataSetupInterface;
12-
use Magento\Setup\Model\Patch\DataPatchInterface;
13-
use Magento\Setup\Model\Patch\PatchVersionInterface;
11+
use Magento\Framework\Setup\Patch\DataPatchInterface;
12+
use Magento\Framework\Setup\Patch\PatchVersionInterface;
1413

1514
/**
1615
* Initial patch.

app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Magento\Backend\Block\Template\Context;
1010
use Magento\Framework\Data\Form;
1111
use Magento\Framework\Data\Form\Element\AbstractElement;
12+
use Magento\Framework\Locale\ResolverInterface;
1213
use Magento\Framework\Stdlib\DateTime\TimezoneInterface;
1314
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
1415

@@ -34,6 +35,11 @@ class CollectionTimeLabelTest extends \PHPUnit\Framework\TestCase
3435
*/
3536
private $abstractElementMock;
3637

38+
/**
39+
* @var ResolverInterface|\PHPUnit_Framework_MockObject_MockObject
40+
*/
41+
private $localeResolver;
42+
3743
protected function setUp()
3844
{
3945
$this->abstractElementMock = $this->getMockBuilder(AbstractElement::class)
@@ -53,12 +59,17 @@ protected function setUp()
5359
$this->contextMock->expects($this->any())
5460
->method('getLocaleDate')
5561
->willReturn($this->timeZoneMock);
62+
$this->localeResolver = $this->getMockBuilder(ResolverInterface::class)
63+
->disableOriginalConstructor()
64+
->setMethods(['getLocale'])
65+
->getMockForAbstractClass();
5666

5767
$objectManager = new ObjectManager($this);
5868
$this->collectionTimeLabel = $objectManager->getObject(
5969
CollectionTimeLabel::class,
6070
[
61-
'context' => $this->contextMock
71+
'context' => $this->contextMock,
72+
'localeResolver' => $this->localeResolver
6273
]
6374
);
6475
}
@@ -73,6 +84,9 @@ public function testRender()
7384
$this->abstractElementMock->expects($this->any())
7485
->method('getComment')
7586
->willReturn('Eastern Standard Time (America/New_York)');
87+
$this->localeResolver->expects($this->once())
88+
->method('getLocale')
89+
->willReturn('en_US');
7690
$this->assertRegexp(
7791
"/Eastern Standard Time \(America\/New_York\)/",
7892
$this->collectionTimeLabel->render($this->abstractElementMock)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="urn:magento:setup:Model/Declaration/Schema/etc/schema.xsd">
9+
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
1010
<table name="magento_bulk" resource="default" engine="innodb"
1111
comment="Bulk entity that represents set of related asynchronous operations">
1212
<column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"

app/code/Magento/Authorization/Setup/Patch/Data/InitializeAuthRoles.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
use Magento\Framework\App\ResourceConnection;
1010
use Magento\Framework\Setup\ModuleDataSetupInterface;
11-
use Magento\Setup\Model\Patch\DataPatchInterface;
12-
use Magento\Setup\Model\Patch\PatchVersionInterface;
11+
use Magento\Framework\Setup\Patch\DataPatchInterface;
12+
use Magento\Framework\Setup\Patch\PatchVersionInterface;
1313
use Magento\Authorization\Model\Acl\Role\Group as RoleGroup;
1414
use Magento\Authorization\Model\UserContextInterface;
1515

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="urn:magento:setup:Model/Declaration/Schema/etc/schema.xsd">
9+
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
1010
<table name="authorization_role" resource="default" engine="innodb" comment="Admin Role Table">
1111
<column xsi:type="int" name="role_id" padding="10" unsigned="true" nullable="false" identity="true"
1212
comment="Role ID"/>

app/code/Magento/Braintree/Setup/Patch/Data/ConvertSerializedDataToJson.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
use Magento\Framework\App\ResourceConnection;
1010
use Magento\Framework\Setup\ModuleDataSetupInterface;
11-
use Magento\Setup\Model\Patch\DataPatchInterface;
12-
use Magento\Setup\Model\Patch\PatchVersionInterface;
11+
use Magento\Framework\Setup\Patch\DataPatchInterface;
12+
use Magento\Framework\Setup\Patch\PatchVersionInterface;
1313

1414
/**
1515
* Convert data fro php native serialized data to JSON.

0 commit comments

Comments
 (0)