Skip to content

Commit 1693019

Browse files
committed
Merge branch '2.3-develop' of github.com:magento/magento2ce into batch-35-forwardport-2.3-develop
2 parents bd07bcc + 87e96d3 commit 1693019

File tree

1,176 files changed

+22207
-10164
lines changed

Some content is hidden

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

1,176 files changed

+22207
-10164
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')

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_AdminNotification" setup_version="2.0.0">
9+
<module name="Magento_AdminNotification" >
1010
<sequence>
1111
<module name="Magento_Store"/>
1212
</sequence>

app/code/Magento/AdvancedPricingImportExport/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_AdvancedPricingImportExport" setup_version="2.0.0">
9+
<module name="Magento_AdvancedPricingImportExport" >
1010
</module>
1111
</config>

app/code/Magento/Analytics/Model/Config/Backend/CollectionTime.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ public function afterSave()
6666
$result = preg_match('#(?<hour>\d{2}),(?<min>\d{2}),(?<sec>\d{2})#', $this->getValue(), $time);
6767

6868
if (!$result) {
69-
throw new LocalizedException(__('Time value has an unsupported format'));
69+
throw new LocalizedException(
70+
__('The time value is using an unsupported format. Enter a supported format and try again.')
71+
);
7072
}
7173

7274
$cronExprArray = [

app/code/Magento/Analytics/Model/Cryptographer.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,18 @@ public function encode($source)
5656
try {
5757
$source = (string)$source;
5858
} catch (\Exception $e) {
59-
throw new LocalizedException(__('Input data must be string or convertible into string.'));
59+
throw new LocalizedException(
60+
__(
61+
'The data is invalid. '
62+
. 'Enter the data as a string or data that can be converted into a string and try again.'
63+
)
64+
);
6065
}
6166
} elseif (!$source) {
62-
throw new LocalizedException(__('Input data must be non-empty string.'));
67+
throw new LocalizedException(__('The data is invalid. Enter the data as a string and try again.'));
6368
}
6469
if (!$this->validateCipherMethod($this->cipherMethod)) {
65-
throw new LocalizedException(__('Not valid cipher method.'));
70+
throw new LocalizedException(__('The data is invalid. Use a valid cipher method and try again.'));
6671
}
6772
$initializationVector = $this->getInitializationVector();
6873

@@ -90,7 +95,7 @@ private function getKey()
9095
{
9196
$token = $this->analyticsToken->getToken();
9297
if (!$token) {
93-
throw new LocalizedException(__('Encryption key can\'t be empty.'));
98+
throw new LocalizedException(__('Enter the encryption key and try again.'));
9499
}
95100
return hash('sha256', $token);
96101
}

app/code/Magento/Analytics/Model/ExportDataHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ private function pack($source, $destination)
195195
private function validateSource(WriteInterface $directory, $path)
196196
{
197197
if (!$directory->isExist($path)) {
198-
throw new LocalizedException(__('Source "%1" is not exist', $directory->getAbsolutePath($path)));
198+
throw new LocalizedException(__('The "%1" source doesn\'t exist.', $directory->getAbsolutePath($path)));
199199
}
200200

201201
return $directory->getAbsolutePath($path);

app/code/Magento/Analytics/Setup/InstallData.php

Lines changed: 0 additions & 52 deletions
This file was deleted.
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Analytics\Setup\Patch\Data;
8+
9+
use Magento\Analytics\Model\Config\Backend\Enabled\SubscriptionHandler;
10+
use Magento\Framework\App\ResourceConnection;
11+
use Magento\Framework\Setup\ModuleDataSetupInterface;
12+
use Magento\Setup\Model\Patch\DataPatchInterface;
13+
use Magento\Setup\Model\Patch\PatchVersionInterface;
14+
15+
/**
16+
* Initial patch.
17+
*
18+
* @package Magento\Analytics\Setup\Patch
19+
*/
20+
class PrepareInitialConfig implements DataPatchInterface, PatchVersionInterface
21+
{
22+
/**
23+
* @var ModuleDataSetupInterface
24+
*/
25+
private $moduleDataSetup;
26+
27+
/**
28+
* PrepareInitialConfig constructor.
29+
* @param ModuleDataSetupInterface $moduleDataSetup
30+
*/
31+
public function __construct(
32+
ModuleDataSetupInterface $moduleDataSetup
33+
) {
34+
$this->moduleDataSetup = $moduleDataSetup;
35+
}
36+
37+
/**
38+
* {@inheritdoc}
39+
*/
40+
public function apply()
41+
{
42+
$this->moduleDataSetup->getConnection()->insertMultiple(
43+
$this->moduleDataSetup->getTable('core_config_data'),
44+
[
45+
[
46+
'scope' => 'default',
47+
'scope_id' => 0,
48+
'path' => 'analytics/subscription/enabled',
49+
'value' => 1
50+
],
51+
[
52+
'scope' => 'default',
53+
'scope_id' => 0,
54+
'path' => SubscriptionHandler::CRON_STRING_PATH,
55+
'value' => join(' ', SubscriptionHandler::CRON_EXPR_ARRAY)
56+
]
57+
]
58+
);
59+
60+
$this->moduleDataSetup->getConnection()->insert(
61+
$this->moduleDataSetup->getTable('flag'),
62+
[
63+
'flag_code' => SubscriptionHandler::ATTEMPTS_REVERSE_COUNTER_FLAG_CODE,
64+
'state' => 0,
65+
'flag_data' => 24,
66+
]
67+
);
68+
}
69+
70+
/**
71+
* {@inheritdoc}
72+
*/
73+
public static function getDependencies()
74+
{
75+
return [];
76+
}
77+
78+
/**
79+
* {@inheritdoc}
80+
*/
81+
public static function getVersion()
82+
{
83+
return '2.0.0';
84+
}
85+
86+
/**
87+
* {@inheritdoc}
88+
*/
89+
public function getAliases()
90+
{
91+
return [];
92+
}
93+
}

app/code/Magento/Analytics/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_Analytics" setup_version="2.0.0">
9+
<module name="Magento_Analytics" >
1010
<sequence>
1111
<module name="Magento_Integration"/>
1212
<module name="Magento_Backend"/>

app/code/Magento/Authorization/Model/Acl/AclRetriever.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function getAllowedResourcesByUser($userType, $userId)
8484
$role = $this->_getUserRole($userType, $userId);
8585
if (!$role) {
8686
throw new AuthorizationException(
87-
__('We can\'t find the role for the user you wanted.')
87+
__("The role wasn't found for the user. Verify the role and try again.")
8888
);
8989
}
9090
$allowedResources = $this->getAllowedResourcesByRole($role->getId());

0 commit comments

Comments
 (0)