Skip to content

Commit 836a325

Browse files
authored
Merge branch 'magento:2.4-develop' into 2.4-develop
2 parents ba24475 + 207c959 commit 836a325

File tree

2,365 files changed

+87801
-48500
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,365 files changed

+87801
-48500
lines changed

.github/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
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
@@ -33,7 +33,7 @@ This will allow you to collaborate with the Magento 2 development team, fork the
3333
1. Search current [listed issues](https://github.com/magento/magento2/issues) (open or closed) for similar proposals of intended contribution before starting work on a new contribution.
3434
2. Review the [Contributor License Agreement](https://opensource.adobe.com/cla.html) if this is your first time contributing.
3535
3. Create and test your work.
36-
4. Fork the Magento 2 repository according to the [Fork A Repository instructions](https://devdocs.magento.com/guides/v2.4/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow the [Create A Pull Request instructions](https://devdocs.magento.com/guides/v2.4/contributor-guide/contributing.html#pull_request).
36+
4. Follow the [Forks And Pull Requests Instructions](https://devdocs.magento.com/contributor-guide/contributing.html#forks-and-pull-requests) to fork the Magento 2 repository and send us a pull request.
3737
5. Once your contribution is received the Magento 2 development team will review the contribution and collaborate with you as needed.
3838

3939
## Code of Conduct
@@ -43,6 +43,6 @@ The full text is available in the repository [Wiki](https://github.com/magento/m
4343

4444
## Connecting with Community!
4545

46-
If you have any questions, join us in [#beginners](https://magentocommeng.slack.com/messages/CH8BGFX9D) Slack chat. If you are not on our slack, [click here](http://tinyurl.com/engcom-slack) to join.
46+
If you have any questions, join us in [#beginners](https://magentocommeng.slack.com/archives/CH8BGFX9D) Slack chat. If you are not on our slack, [click here](http://tinyurl.com/engcom-slack) to join.
4747

4848
Need to find a project? Check out the [Slack Channels](https://github.com/magento/magento2/wiki/Slack-Channels) (with listed project info) and the [Magento Community Portal](https://opensource.magento.com/).

.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": "*",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"Allow Adobe to collect usage data to improve user experience and offer in-product guidance", "Allow Adobe to collect usage data to improve user experience and offer in-product guidance"
2+
"<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class=""modal-list""> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href=""https://docs.magento.com/user-guide/configuration/advanced/admin.html#admin-usage"">merchant documentation</a>.</p>", "<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class=""modal-list""> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href=""https://docs.magento.com/user-guide/configuration/advanced/admin.html#admin-usage"">merchant documentation</a>.</p>"
3+

app/code/Magento/AdminAnalytics/view/adminhtml/layout/adminhtml_dashboard_index.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
</block>
2020
</referenceContainer>
2121
</body>
22-
</page>
22+
</page>

app/code/Magento/AdminAnalytics/view/adminhtml/ui_component/admin_usage_notification.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<state>true</state>
5050
<options>
5151
<option name="modalClass" xsi:type="string">admin-usage-notification</option>
52-
<option name="title" xsi:type="string" translate="true">Allow admin usage data collection</option>
52+
<option name="title" xsi:type="string" translate="true">Allow Adobe to collect usage data to improve user experience and offer in-product guidance</option>
5353
<option name="autoOpen" xsi:type="boolean">true</option>
5454
<option name="type" xsi:type="string">popup</option>
5555
<option name="clickableOverlay" xsi:type="boolean">false</option>
@@ -82,11 +82,7 @@
8282
<item name="config" xsi:type="array">
8383
<item name="label" xsi:type="string"/>
8484
<item name="additionalClasses" xsi:type="string">release-notification-text</item>
85-
<item name="text" xsi:type="string" translate="true"><![CDATA[
86-
<p>Help us improve Magento Admin by allowing us to collect usage data.</p>
87-
<p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin and related products and services.</p>
88-
<p>You can learn more and opt out at any time by following the instructions in <a href="https://docs.magento.com/user-guide/stores/admin.html" target="_blank" tabindex="0">merchant documentation</a>.</p>
89-
]]></item>
85+
<item name="text" xsi:type="string" translate="true"><![CDATA[<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class="modal-list"> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href="https://docs.magento.com/user-guide/configuration/advanced/admin.html#admin-usage">merchant documentation</a>.</p>]]></item>
9086
</item>
9187
</argument>
9288
</container>

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)