Skip to content

Commit c343492

Browse files
authored
Merge branch '2.4-develop' into 23971
2 parents 575d9e5 + 39914f7 commit c343492

File tree

7,433 files changed

+257150
-59141
lines changed

Some content is hidden

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

7,433 files changed

+257150
-59141
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Fields marked with (*) are required. Please don't remove the template.
1111

1212
### Preconditions (*)
1313
<!---
14-
Provide the exact Magento version (example: 2.2.5) and any important information on the environment where bug is reproducible.
14+
Provide the exact Magento version (example: 2.3.2) and any important information on the environment where bug is reproducible.
1515
-->
1616
1.
1717
2.

.github/ISSUE_TEMPLATE/developer-experience-issue.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: Developer experience issue
33
about: Issues related to customization, extensibility, modularity
4+
labels: 'Triage: Dev.Experience'
45

56
---
67

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: Feature request
33
about: Please consider reporting directly to https://github.com/magento/community-features
4+
labels: 'feature request'
45

56
---
67

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
Letting us know what has changed and why it needed changing will help us validate this pull request.
1616
-->
1717

18+
### Related Pull Requests
19+
<!-- related pull request placeholder -->
20+
1821
### Fixed Issues (if relevant)
1922
<!---
2023
If relevant, please provide a list of fixed issues in the format magento/magento2#<issue_number>.

.htaccess

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,6 @@
3737

3838
DirectoryIndex index.php
3939

40-
<IfModule mod_php5.c>
41-
############################################
42-
## adjust memory limit
43-
44-
php_value memory_limit 756M
45-
php_value max_execution_time 18000
46-
47-
############################################
48-
## disable automatic session start
49-
## before autoload was initialized
50-
51-
php_flag session.auto_start off
52-
53-
############################################
54-
## enable resulting html compression
55-
56-
#php_flag zlib.output_compression on
57-
58-
###########################################
59-
## disable user agent verification to not break multiple image upload
60-
61-
php_flag suhosin.session.cryptua off
62-
</IfModule>
6340
<IfModule mod_php7.c>
6441
############################################
6542
## adjust memory limit

CHANGELOG.md

Lines changed: 415 additions & 3 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,58 @@
1-
[![Open Source Helpers](https://www.codetriage.com/magento/magento2/badges/users.svg)](https://www.codetriage.com/magento/magento2)
2-
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/magento/magento2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
3-
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/magento-2/localized.svg)](https://crowdin.com/project/magento-2)
4-
<h2>Welcome</h2>
1+
<p align="center">
2+
<a href="https://magento.com">
3+
<img src="https://static.magento.com/sites/all/themes/magento/logo.svg" width="300px" alt="Magento" />
4+
</a>
5+
</p>
6+
<p align="center">
7+
<br /><br />
8+
<a href="https://www.codetriage.com/magento/magento2">
9+
<img src="https://www.codetriage.com/magento/magento2/badges/users.svg" alt="Open Source Helpers" />
10+
</a>
11+
<a href="https://gitter.im/magento/magento2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge">
12+
<img src="https://badges.gitter.im/Join%20Chat.svg" alt="Gitter" />
13+
</a>
14+
<a href="https://crowdin.com/project/magento-2">
15+
<img src="https://d322cqt584bo4o.cloudfront.net/magento-2/localized.svg" alt="Crowdin" />
16+
</a>
17+
</p>
18+
19+
## Welcome
520
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting-edge, feature-rich eCommerce solution that gets results.
621

722
## Magento System Requirements
823
[Magento System Requirements](https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements.html).
924

1025
## Install Magento
1126

12-
* [Installation Guide](https://devdocs.magento.com/guides/v2.3/install-gde/bk-install-guide.html).
27+
* [Installation Guide](https://devdocs.magento.com/guides/v2.3/install-gde/bk-install-guide.html).
28+
29+
## Learn More About GraphQL in Magento 2
30+
31+
* [GraphQL Developer Guide](https://devdocs.magento.com/guides/v2.3/graphql/index.html)
1332

1433
<h2>Contributing to the Magento 2 Code Base</h2>
1534
Contributions can take the form of new components or features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes, optimizations, or just good suggestions.
1635

17-
To learn about how to make a contribution, click [here][1].
36+
To learn about how to contribute, click [here][1].
1837

1938
To learn about issues, click [here][2]. To open an issue, click [here][3].
2039

2140
To suggest documentation improvements, click [here][4].
2241

23-
[1]: <https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html>
24-
[2]: <https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#report>
25-
[3]: <https://github.com/magento/magento2/issues>
26-
[4]: <https://devdocs.magento.com>
42+
[1]: https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html
43+
[2]: https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#report
44+
[3]: https://github.com/magento/magento2/issues
45+
[4]: https://devdocs.magento.com
2746

2847
<h3>Community Maintainers</h3>
29-
The members of this team have been recognized for their outstanding commitment to maintaining and improving Magento. Magento has granted them permission to accept, merge, and reject pull requests, as well as review issues, and thanks these Community Maintainers for their valuable contributions.
48+
The members of this team have been recognized for their outstanding commitment to maintaining and improving Magento. Magento has granted them permission to accept, merge, and reject pull requests, as well as review issues, and thanks to these Community Maintainers for their valuable contributions.
3049

3150
<a href="https://magento.com/magento-contributors#maintainers">
3251
<img src="https://raw.githubusercontent.com/wiki/magento/magento2/images/maintainers.png"/>
3352
</a>
3453

3554
<h3>Top Contributors</h3>
36-
Magento is thankful for any contribution that can improve our code base, documentation or increase test coverage. We always recognize our most active members, as their contributions are the foundation of the Magento Open Source platform.
55+
Magento is thankful for any contribution that can improve our codebase, documentation or increase test coverage. We always recognize our most active members, as their contributions are the foundation of the Magento Open Source platform.
3756
<a href="https://magento.com/magento-contributors">
3857
<img src="https://raw.githubusercontent.com/wiki/magento/magento2/images/contributors.png"/>
3958
</a>
@@ -44,7 +63,7 @@ Please review the [Code Contributions guide](https://devdocs.magento.com/guides/
4463

4564
## Reporting Security Issues
4665

47-
To report security vulnerabilities or learn more about reporting security issues in Magento software or web sites visit the [Magento Bug Bounty Program](https://hackerone.com/magento) on hackerone. Please create a hackerone account [there](https://hackerone.com/magento) to submit and follow-up your issue.
66+
To report security vulnerabilities or learn more about reporting security issues in Magento software or web sites visit the [Magento Bug Bounty Program](https://hackerone.com/magento) on hackerone. Please create a hackerone account [there](https://hackerone.com/magento) to submit and follow-up on your issue.
4867

4968
Stay up-to-date on the latest security news and patches for Magento by signing up for [Security Alert Notifications](https://magento.com/security/sign-up).
5069

@@ -60,7 +79,7 @@ Please see LICENSE_EE.txt for the full text of the MEE License or visit https://
6079

6180
## Community Engineering Slack
6281

63-
To connect with Magento and the Community, join us on the [Magento Community Engineering Slack](https://magentocommeng.slack.com). If you are interested in joining Slack, or a specific channel, send us request at [engcom@adobe.com](mailto:engcom@adobe.com) or [self signup](https://tinyurl.com/engcom-slack).
82+
To connect with Magento and the Community, join us on the [Magento Community Engineering Slack](https://magentocommeng.slack.com). If you are interested in joining Slack, or a specific channel, send us a request at [engcom@adobe.com](mailto:engcom@adobe.com) or [self signup](https://opensource.magento.com/slack).
6483

6584

6685
We have channels for each project. These channels are recommended for new members:
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\AdminAnalytics\Controller\Adminhtml\Config;
9+
10+
use Magento\Backend\App\Action;
11+
use Magento\Framework\App\Action\HttpPostActionInterface;
12+
use Magento\Framework\Controller\ResultFactory;
13+
use Magento\AdminAnalytics\Model\ResourceModel\Viewer\Logger as NotificationLogger;
14+
use Magento\Framework\App\ProductMetadataInterface;
15+
use Magento\Framework\Controller\ResultInterface;
16+
use Magento\Config\Model\Config\Factory;
17+
18+
/**
19+
* Controller to record Admin analytics usage log
20+
*/
21+
class DisableAdminUsage extends Action implements HttpPostActionInterface
22+
{
23+
/**
24+
* @var Factory
25+
*/
26+
private $configFactory;
27+
28+
/**
29+
* @var ProductMetadataInterface
30+
*/
31+
private $productMetadata;
32+
33+
/**
34+
* @var NotificationLogger
35+
*/
36+
private $notificationLogger;
37+
38+
/**
39+
* DisableAdminUsage constructor.
40+
*
41+
* @param Action\Context $context
42+
* @param ProductMetadataInterface $productMetadata
43+
* @param NotificationLogger $notificationLogger
44+
* @param Factory $configFactory
45+
*/
46+
public function __construct(
47+
Action\Context $context,
48+
ProductMetadataInterface $productMetadata,
49+
NotificationLogger $notificationLogger,
50+
Factory $configFactory
51+
) {
52+
parent::__construct($context);
53+
$this->configFactory = $configFactory;
54+
$this->productMetadata = $productMetadata;
55+
$this->notificationLogger = $notificationLogger;
56+
}
57+
58+
/**
59+
* Change the value of config/admin/usage/enabled
60+
*/
61+
private function disableAdminUsage()
62+
{
63+
$configModel = $this->configFactory->create();
64+
$configModel->setDataByPath('admin/usage/enabled', 0);
65+
$configModel->save();
66+
}
67+
68+
/**
69+
* Log information about the last admin usage selection
70+
*
71+
* @return ResultInterface
72+
*/
73+
private function markUserNotified(): ResultInterface
74+
{
75+
$responseContent = [
76+
'success' => $this->notificationLogger->log(
77+
$this->productMetadata->getVersion()
78+
),
79+
'error_message' => ''
80+
];
81+
82+
$resultJson = $this->resultFactory->create(ResultFactory::TYPE_JSON);
83+
return $resultJson->setData($responseContent);
84+
}
85+
86+
/**
87+
* Log information about the last shown advertisement
88+
*
89+
* @return ResultInterface
90+
*/
91+
public function execute()
92+
{
93+
$this->disableAdminUsage();
94+
$this->markUserNotified();
95+
}
96+
97+
/**
98+
* @inheritDoc
99+
*/
100+
protected function _isAllowed()
101+
{
102+
return $this->_authorization->isAllowed(static::ADMIN_RESOURCE);
103+
}
104+
}
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\AdminAnalytics\Controller\Adminhtml\Config;
9+
10+
use Magento\Backend\App\Action;
11+
use Magento\Framework\App\Action\HttpPostActionInterface;
12+
use Magento\Framework\Controller\ResultFactory;
13+
use Magento\AdminAnalytics\Model\ResourceModel\Viewer\Logger as NotificationLogger;
14+
use Magento\Framework\App\ProductMetadataInterface;
15+
use Magento\Framework\Controller\ResultInterface;
16+
use Magento\Config\Model\Config\Factory;
17+
18+
/**
19+
* Controller to record that the current admin user has responded to Admin Analytics notice
20+
*/
21+
class EnableAdminUsage extends Action implements HttpPostActionInterface
22+
{
23+
/**
24+
* @var Factory
25+
*/
26+
private $configFactory;
27+
28+
/**
29+
* @var ProductMetadataInterface
30+
*/
31+
private $productMetadata;
32+
33+
/**
34+
* @var NotificationLogger
35+
*/
36+
private $notificationLogger;
37+
38+
/**
39+
* @param Action\Context $context
40+
* @param ProductMetadataInterface $productMetadata
41+
* @param NotificationLogger $notificationLogger
42+
* @param Factory $configFactory
43+
*/
44+
public function __construct(
45+
Action\Context $context,
46+
ProductMetadataInterface $productMetadata,
47+
NotificationLogger $notificationLogger,
48+
Factory $configFactory
49+
) {
50+
parent::__construct($context);
51+
$this->configFactory = $configFactory;
52+
$this->productMetadata = $productMetadata;
53+
$this->notificationLogger = $notificationLogger;
54+
}
55+
56+
/**
57+
* Change the value of config/admin/usage/enabled
58+
*/
59+
private function enableAdminUsage()
60+
{
61+
$configModel = $this->configFactory->create();
62+
$configModel->setDataByPath('admin/usage/enabled', 1);
63+
$configModel->save();
64+
}
65+
66+
/**
67+
* Log information about the last user response
68+
*
69+
* @return ResultInterface
70+
*/
71+
private function markUserNotified(): ResultInterface
72+
{
73+
$responseContent = [
74+
'success' => $this->notificationLogger->log(
75+
$this->productMetadata->getVersion()
76+
),
77+
'error_message' => ''
78+
];
79+
80+
$resultJson = $this->resultFactory->create(ResultFactory::TYPE_JSON);
81+
return $resultJson->setData($responseContent);
82+
}
83+
84+
/**
85+
* Log information about the last shown advertisement
86+
*
87+
* @return \Magento\Framework\Controller\ResultInterface
88+
*/
89+
public function execute()
90+
{
91+
$this->enableAdminUsage();
92+
$this->markUserNotified();
93+
}
94+
95+
/**
96+
* @inheritDoc
97+
*/
98+
protected function _isAllowed()
99+
{
100+
return $this->_authorization->isAllowed(static::ADMIN_RESOURCE);
101+
}
102+
}

0 commit comments

Comments
 (0)