Skip to content

Commit 131f707

Browse files
committed
Merge remote-tracking branch 'magento2/2.4-develop' into 33099
2 parents f042313 + 9b8d557 commit 131f707

File tree

1,241 files changed

+42379
-28429
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,241 files changed

+42379
-28429
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 & 5 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);
@@ -53,7 +55,7 @@ module.exports = function (grunt) {
5355
'autoprefixer',
5456
'cssmin',
5557
'usebanner'
56-
].map(function(task){
58+
].map(function (task) {
5759
return task + ':' + component;
5860
});
5961

@@ -72,7 +74,7 @@ module.exports = function (grunt) {
7274
'clean',
7375
'exec:all'
7476
];
75-
_.each(themes, function(theme, name) {
77+
_.each(themes, function (theme, name) {
7678
tasks.push('less:' + name);
7779
});
7880
grunt.task.run(tasks);

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
}

0 commit comments

Comments
 (0)