Skip to content

Commit 6c9f5b5

Browse files
committed
Merge branch '2.4-develop' into ref-AdminAddBundleItemsTest
2 parents 82a4440 + 207c959 commit 6c9f5b5

File tree

2,062 files changed

+75953
-38470
lines changed

Some content is hidden

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

2,062 files changed

+75953
-38470
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ For more detailed information on contribution please read our [beginners guide](
1717

1818
1. Contributions must adhere to the [Magento coding standards](https://devdocs.magento.com/guides/v2.4/coding-standards/bk-coding-standards.html).
1919
2. Pull requests (PRs) must be accompanied by a meaningful description of their purpose. Comprehensive descriptions increase the chances of a pull request being merged quickly and without additional clarification requests.
20-
3. Commits must be accompanied by meaningful commit messages. Please see the [Magento Pull Request Template](https://github.com/magento/magento2/blob/2.3-develop/.github/PULL_REQUEST_TEMPLATE.md) for more information.
20+
3. Commits must be accompanied by meaningful commit messages. Please see the [Magento Pull Request Template](https://github.com/magento/magento2/blob/HEAD/.github/PULL_REQUEST_TEMPLATE.md) for more information.
2121
4. PRs which include bug fixes must be accompanied with a step-by-step description of how to reproduce the bug.
2222
3. PRs which include new logic or new features must be submitted along with:
2323
* Unit/integration test coverage

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ atlassian*
3232
/package.json
3333
/.php_cs
3434
/.php_cs.cache
35+
/.php-cs-fixer.php
36+
/.php-cs-fixer.cache
3537
/grunt-config.json
3638
/pub/media/*.*
3739
!/pub/media/.htaccess

.php_cs.dist renamed to .php-cs-fixer.dist.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@
2121
->exclude('setup/vendor')
2222
->exclude('var');
2323

24-
return PhpCsFixer\Config::create()
25-
->setFinder($finder)
24+
$config = new PhpCsFixer\Config();
25+
$config->setFinder($finder)
2626
->setRules([
2727
'@PSR2' => true,
2828
'array_syntax' => ['syntax' => 'short'],
2929
'concat_space' => ['spacing' => 'one'],
3030
'include' => true,
3131
'new_with_braces' => true,
3232
'no_empty_statement' => true,
33-
'no_extra_consecutive_blank_lines' => true,
33+
'no_extra_blank_lines' => true,
3434
'no_leading_import_slash' => true,
3535
'no_leading_namespace_whitespace' => true,
3636
'no_multiline_whitespace_around_double_arrow' => true,
37-
'no_multiline_whitespace_before_semicolons' => true,
37+
'multiline_whitespace_before_semicolons' => true,
3838
'no_singleline_whitespace_before_semicolons' => true,
3939
'no_trailing_comma_in_singleline_array' => true,
4040
'no_unused_imports' => true,
@@ -44,3 +44,4 @@
4444
'standardize_not_equals' => true,
4545
'ternary_operator_spaces' => true,
4646
]);
47+
return $config;

Gruntfile.js.sample

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ module.exports = function (grunt) {
1616
tasks = grunt.file.expand('./dev/tools/grunt/tasks/*'),
1717
themes;
1818

19-
filesRouter.set('themes', 'dev/tools/grunt/configs/themes');
20-
themes = filesRouter.get('themes');
19+
filesRouter.set('themes', 'dev/tools/grunt/configs/themes');
20+
themes = filesRouter.get('themes');
2121

22-
tasks = _.map(tasks, function(task){ return task.replace('.js', '') });
22+
tasks = _.map(tasks, function (task) {
23+
return task.replace('.js', '');
24+
});
2325
tasks.push('time-grunt');
2426
tasks.forEach(function (task) {
2527
require(task)(grunt);
@@ -50,10 +52,9 @@ module.exports = function (grunt) {
5052
prod: function (component) {
5153
var tasks = [
5254
'less',
53-
'autoprefixer',
5455
'cssmin',
5556
'usebanner'
56-
].map(function(task){
57+
].map(function (task) {
5758
return task + ':' + component;
5859
});
5960

@@ -72,7 +73,7 @@ module.exports = function (grunt) {
7273
'clean',
7374
'exec:all'
7475
];
75-
_.each(themes, function(theme, name) {
76+
_.each(themes, function (theme, name) {
7677
tasks.push('less:' + name);
7778
});
7879
grunt.task.run(tasks);

app/bootstrap.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@
3030
exit(1);
3131
}
3232

33+
// PHP 8 compatibility. Define constants that are not present in PHP < 8.0
34+
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 80000) {
35+
if (!defined('T_NAME_QUALIFIED')) {
36+
define('T_NAME_QUALIFIED', 24001);
37+
}
38+
if (!defined('T_NAME_FULLY_QUALIFIED')) {
39+
define('T_NAME_FULLY_QUALIFIED', 24002);
40+
}
41+
}
42+
3343
require_once __DIR__ . '/autoload.php';
3444
// Sets default autoload mappings, may be overridden in Bootstrap::create
3545
\Magento\Framework\App\Bootstrap::populateAutoloader(BP, []);

app/code/Magento/AdminAnalytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "~7.3.0||~7.4.0",
8+
"php": "~7.4.0||~8.0.0",
99
"magento/framework": "*",
1010
"magento/module-backend": "*",
1111
"magento/module-config": "*",

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

Lines changed: 52 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,42 +28,69 @@
2828
*/
2929
class FeedTest extends TestCase
3030
{
31-
/** @var Feed */
31+
/**
32+
* @var Feed
33+
*/
3234
protected $feed;
3335

34-
/** @var ObjectManagerHelper */
36+
/**
37+
* @var ObjectManagerHelper
38+
*/
3539
protected $objectManagerHelper;
3640

37-
/** @var InboxFactory|MockObject */
41+
/**
42+
* @var InboxFactory|MockObject
43+
*/
3844
protected $inboxFactory;
3945

40-
/** @var Inbox|MockObject */
46+
/**
47+
* @var Inbox|MockObject
48+
*/
4149
protected $inboxModel;
4250

43-
/** @var CurlFactory|MockObject */
51+
/**
52+
* @var CurlFactory|MockObject
53+
*/
4454
protected $curlFactory;
4555

46-
/** @var Curl|MockObject */
56+
/**
57+
* @var Curl|MockObject
58+
*/
4759
protected $curl;
4860

49-
/** @var ConfigInterface|MockObject */
61+
/**
62+
* @var ConfigInterface|MockObject
63+
*/
5064
protected $backendConfig;
5165

52-
/** @var CacheInterface|MockObject */
66+
/**
67+
* @var CacheInterface|MockObject
68+
*/
5369
protected $cacheManager;
5470

55-
/** @var State|MockObject */
71+
/**
72+
* @var State|MockObject
73+
*/
5674
protected $appState;
5775

58-
/** @var DeploymentConfig|MockObject */
76+
/**
77+
* @var DeploymentConfig|MockObject
78+
*/
5979
protected $deploymentConfig;
6080

61-
/** @var ProductMetadata|MockObject */
81+
/**
82+
* @var ProductMetadata|MockObject
83+
*/
6284
protected $productMetadata;
6385

64-
/** @var UrlInterface|MockObject */
86+
/**
87+
* @var UrlInterface|MockObject
88+
*/
6589
protected $urlBuilder;
6690

91+
/**
92+
* @inheritDoc
93+
*/
6794
protected function setUp(): void
6895
{
6996
$this->inboxFactory = $this->createPartialMock(
@@ -97,11 +124,8 @@ protected function setUp(): void
97124
);
98125

99126
$this->deploymentConfig = $this->createMock(DeploymentConfig::class);
100-
101127
$this->objectManagerHelper = new ObjectManagerHelper($this);
102-
103128
$this->productMetadata = $this->createMock(ProductMetadata::class);
104-
105129
$this->urlBuilder = $this->getMockForAbstractClass(UrlInterface::class);
106130

107131
$this->feed = $this->objectManagerHelper->getObject(
@@ -120,11 +144,13 @@ protected function setUp(): void
120144
}
121145

122146
/**
123-
* @dataProvider checkUpdateDataProvider
124147
* @param bool $callInbox
125148
* @param string $curlRequest
149+
*
150+
* @return void
151+
* @dataProvider checkUpdateDataProvider
126152
*/
127-
public function testCheckUpdate($callInbox, $curlRequest)
153+
public function testCheckUpdate(bool $callInbox, string $curlRequest): void
128154
{
129155
$mockName = 'Test Product Name';
130156
$mockVersion = '0.0.0';
@@ -144,16 +170,19 @@ public function testCheckUpdate($callInbox, $curlRequest)
144170

145171
$lastUpdate = 0;
146172
$this->cacheManager->expects($this->once())->method('load')->willReturn($lastUpdate);
147-
$this->curlFactory->expects($this->at(0))->method('create')->willReturn($this->curl);
173+
$this->curlFactory
174+
->method('create')
175+
->willReturn($this->curl);
148176
$this->curl->expects($this->once())->method('setConfig')->with($configValues)->willReturnSelf();
149177
$this->curl->expects($this->once())->method('read')->willReturn($curlRequest);
150-
$this->backendConfig->expects($this->at(0))->method('getValue')->willReturn('1');
151178
$this->backendConfig->expects($this->once())->method('isSetFlag')->willReturn(false);
152-
$this->backendConfig->expects($this->at(1))->method('getValue')
153-
->willReturn('http://feed.magento.com');
179+
$this->backendConfig
180+
->method('getValue')
181+
->willReturnOnConsecutiveCalls('1', 'http://feed.magento.com');
154182
$this->deploymentConfig->expects($this->once())->method('get')
155183
->with(ConfigOptionsListConstants::CONFIG_PATH_INSTALL_DATE)
156184
->willReturn('Sat, 6 Sep 2014 16:46:11 UTC');
185+
157186
if ($callInbox) {
158187
$this->inboxFactory->expects($this->once())->method('create')
159188
->willReturn($this->inboxModel);
@@ -188,7 +217,7 @@ function ($initialValue, $item) use ($data) {
188217
/**
189218
* @return array
190219
*/
191-
public function checkUpdateDataProvider()
220+
public function checkUpdateDataProvider(): array
192221
{
193222
return [
194223
[
@@ -246,7 +275,7 @@ public function checkUpdateDataProvider()
246275
</channel>
247276
</rss>'
248277
// @codingStandardsIgnoreEnd
249-
],
278+
]
250279
];
251280
}
252281
}

app/code/Magento/AdminNotification/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sort-packages": true
66
},
77
"require": {
8-
"php": "~7.3.0||~7.4.0",
8+
"php": "~7.4.0||~8.0.0",
99
"lib-libxml": "*",
1010
"magento/framework": "*",
1111
"magento/module-backend": "*",

app/code/Magento/AdminNotification/view/adminhtml/web/template/grid/listing.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
<div class="message-system-short">
1010
<button class="message-system-action-dropdown" toggleCollapsible>
1111
<span>
12-
<translate args="'System Messages'"/>:
13-
<text args="totalRecords"/>
12+
<translate args="'System Messages'"></translate>:
13+
<text args="totalRecords"></text>
1414
</span>
1515
</button>
1616
<div class="message-system-short-wrapper" if="rows[0]" repeat="foreach: [rows[0]], item: '$row'" visible="!$collapsible.opened()">
1717
<fastForEach args="data: getVisible(), as: '$col'" >
18-
<render args="$col.getBody()"/>
18+
<render args="$col.getBody()"></render>
1919
</fastForEach>
2020
</div>
2121
</div>
2222
<div class="message-system-collapsible">
2323
<ul class="message-system-list">
2424
<li repeat="foreach: rows, item: '$row'">
2525
<fastForEach args="data: getVisible(), as: '$col'" >
26-
<render args="$col.getBody()"/>
26+
<render args="$col.getBody()"></render>
2727
</fastForEach>
2828
</li>
2929
</ul>

0 commit comments

Comments
 (0)