Skip to content

Commit

Permalink
Merge branch '2.4-develop' into unlock-admin-user
Browse files Browse the repository at this point in the history
  • Loading branch information
sidolov committed Oct 14, 2021
2 parents e1a8c68 + e88d5bd commit 7cf5fee
Show file tree
Hide file tree
Showing 4,004 changed files with 136,027 additions and 219,463 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Expand Up @@ -17,7 +17,7 @@ For more detailed information on contribution please read our [beginners guide](

1. Contributions must adhere to the [Magento coding standards](https://devdocs.magento.com/guides/v2.4/coding-standards/bk-coding-standards.html).
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.
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.
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.
4. PRs which include bug fixes must be accompanied with a step-by-step description of how to reproduce the bug.
3. PRs which include new logic or new features must be submitted along with:
* Unit/integration test coverage
Expand All @@ -33,7 +33,7 @@ This will allow you to collaborate with the Magento 2 development team, fork the
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.
2. Review the [Contributor License Agreement](https://opensource.adobe.com/cla.html) if this is your first time contributing.
3. Create and test your work.
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).
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.
5. Once your contribution is received the Magento 2 development team will review the contribution and collaborate with you as needed.

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

## Connecting with Community!

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.
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.

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/).
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -43,4 +43,5 @@
- [ ] Pull request has a meaningful description of its purpose
- [ ] All commits are accompanied by meaningful commit messages
- [ ] All new or changed code is covered with unit/integration tests (if applicable)
- [ ] README.md files for modified modules are updated and included in the pull request if any [README.md predefined sections](https://github.com/magento/devdocs/wiki/Magento-module-README.md) require an update
- [ ] All automated tests passed successfully (all builds are green)
8 changes: 5 additions & 3 deletions .github/stale.yml
@@ -1,11 +1,11 @@
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 76
daysUntilStale: 152

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 14
daysUntilClose: 28

# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []
Expand All @@ -15,6 +15,8 @@ exemptLabels:
- "Priority: P0"
- "Priority: P1"
- "Priority: P2"
- "Severity: S0"
- "Severity: S1"
- "Progress: dev in progress"
- "Progress: PR in progress"
- "Progress: done"
Expand All @@ -39,7 +41,7 @@ staleLabel: "stale issue"
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed after 14 days if no further activity occurs.
recent activity. It will be closed after 28 days if no further activity occurs.
Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
Thank you for your contributions!
# Comment to post when removing the stale label.
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -32,6 +32,8 @@ atlassian*
/package.json
/.php_cs
/.php_cs.cache
/.php-cs-fixer.php
/.php-cs-fixer.cache
/grunt-config.json
/pub/media/*.*
!/pub/media/.htaccess
Expand Down
47 changes: 47 additions & 0 deletions .php-cs-fixer.dist.php
@@ -0,0 +1,47 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

/**
* PHP Coding Standards fixer configuration
*/

$finder = PhpCsFixer\Finder::create()
->name('*.phtml')
->exclude('dev/tests/integration/tmp')
->exclude('dev/tests/integration/var')
->exclude('lib/internal/Cm')
->exclude('lib/internal/Credis')
->exclude('lib/internal/Less')
->exclude('lib/internal/LinLibertineFont')
->exclude('pub/media')
->exclude('pub/static')
->exclude('setup/vendor')
->exclude('var');

$config = new PhpCsFixer\Config();
$config->setFinder($finder)
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'include' => true,
'new_with_braces' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'multiline_whitespace_before_semicolons' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unused_imports' => true,
'no_whitespace_in_blank_line' => true,
'object_operator_without_whitespace' => true,
'ordered_imports' => true,
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
]);
return $config;
46 changes: 0 additions & 46 deletions .php_cs.dist

This file was deleted.

13 changes: 7 additions & 6 deletions Gruntfile.js.sample
Expand Up @@ -16,10 +16,12 @@ module.exports = function (grunt) {
tasks = grunt.file.expand('./dev/tools/grunt/tasks/*'),
themes;

filesRouter.set('themes', 'dev/tools/grunt/configs/themes');
themes = filesRouter.get('themes');
filesRouter.set('themes', 'dev/tools/grunt/configs/themes');
themes = filesRouter.get('themes');

tasks = _.map(tasks, function(task){ return task.replace('.js', '') });
tasks = _.map(tasks, function (task) {
return task.replace('.js', '');
});
tasks.push('time-grunt');
tasks.forEach(function (task) {
require(task)(grunt);
Expand Down Expand Up @@ -50,10 +52,9 @@ module.exports = function (grunt) {
prod: function (component) {
var tasks = [
'less',
'autoprefixer',
'cssmin',
'usebanner'
].map(function(task){
].map(function (task) {
return task + ':' + component;
});

Expand All @@ -72,7 +73,7 @@ module.exports = function (grunt) {
'clean',
'exec:all'
];
_.each(themes, function(theme, name) {
_.each(themes, function (theme, name) {
tasks.push('less:' + name);
});
grunt.task.run(tasks);
Expand Down
22 changes: 12 additions & 10 deletions README.md
Expand Up @@ -21,13 +21,13 @@ Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a

## Magento System Requirements

[Magento System Requirements](https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html).
* [Magento System Requirements](https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html)

## Install Magento

* [Installation Guide](https://devdocs.magento.com/guides/v2.4/install-gde/bk-install-guide.html).
* [Installation Guide](https://devdocs.magento.com/guides/v2.4/install-gde/bk-install-guide.html)

## Learn More About GraphQL in Magento 2
## Learn About GraphQL in Magento 2

* [GraphQL Developer Guide](https://devdocs.magento.com/guides/v2.4/graphql/index.html)

Expand All @@ -37,12 +37,14 @@ Contributions can take the form of new components or features, changes to existi

To learn about how to contribute, click [here][1].

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

To open an issue, click [here][3].

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

[1]: https://devdocs.magento.com/guides/v2.4/contributor-guide/contributing.html
[2]: https://devdocs.magento.com/guides/v2.4/contributor-guide/contributing.html#report
[1]: https://devdocs.magento.com/contributor-guide/contributing.html
[2]: https://devdocs.magento.com/contributor-guide/contributing.html#report
[3]: https://github.com/magento/magento2/issues
[4]: https://devdocs.magento.com

Expand All @@ -61,7 +63,7 @@ Magento is thankful for any contribution that can improve our codebase, document
### Labels Applied by the Magento Team

We apply labels to public Pull Requests and Issues to help other participants retrieve additional information about current progress, component assignments, Magento release lines, and much more.
Please review the [Code Contributions guide](https://devdocs.magento.com/guides/v2.4/contributor-guide/contributing.html#labels) for detailed information on labels used in Magento 2 repositories.
Please review the [Code Contributions guide](https://devdocs.magento.com/contributor-guide/contributing.html#labels) for detailed information on labels used in Magento 2 repositories.

## Reporting Security Issues

Expand All @@ -85,6 +87,6 @@ To connect with Magento and the Community, join us on the [Magento Community Eng

We have channels for each project. These channels are recommended for new members:

* [general](https://magentocommeng.slack.com/messages/C4YS78WE6): Open chat for introductions and Magento 2 questions
* [github](https://magentocommeng.slack.com/messages/C7KB93M32): Support for GitHub issues, pull requests, and processes
* [public-backlog](https://magentocommeng.slack.com/messages/CCV3J3RV5): Discussions of the Magento 2 backlog
* [general](https://magentocommeng.slack.com/archives/C4YS78WE6): Open chat for introductions and Magento 2 questions
* [github](https://magentocommeng.slack.com/archives/C7KB93M32): Support for GitHub issues, pull requests, and processes
* [public-backlog](https://magentocommeng.slack.com/archives/CCV3J3RV5): Discussions of the Magento 2 backlog
10 changes: 10 additions & 0 deletions app/bootstrap.php
Expand Up @@ -30,6 +30,16 @@
exit(1);
}

// PHP 8 compatibility. Define constants that are not present in PHP < 8.0
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 80000) {
if (!defined('T_NAME_QUALIFIED')) {
define('T_NAME_QUALIFIED', 24001);
}
if (!defined('T_NAME_FULLY_QUALIFIED')) {
define('T_NAME_FULLY_QUALIFIED', 24002);
}
}

require_once __DIR__ . '/autoload.php';
// Sets default autoload mappings, may be overridden in Bootstrap::create
\Magento\Framework\App\Bootstrap::populateAutoloader(BP, []);
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/AdminAnalytics/composer.json
Expand Up @@ -5,7 +5,7 @@
"sort-packages": true
},
"require": {
"php": "~7.3.0||~7.4.0",
"php": "~7.4.0||~8.0.0",
"magento/framework": "*",
"magento/module-backend": "*",
"magento/module-config": "*",
Expand Down
13 changes: 13 additions & 0 deletions app/code/Magento/AdminAnalytics/etc/csp_whitelist.xml
Expand Up @@ -11,6 +11,12 @@
<policy id="script-src">
<values>
<value id="adobedtm" type="host">assets.adobedtm.com</value>
<value id="adobe" type="host">*.adobe.com</value>
</values>
</policy>
<policy id="style-src">
<values>
<value id="adobe" type="host">*.adobe.com</value>
</values>
</policy>
<policy id="img-src">
Expand All @@ -19,6 +25,7 @@
<value id="omtrdc" type="host">amcglobal.sc.omtrdc.net</value>
<value id="dpmdemdex" type="host">dpm.demdex.net</value>
<value id="everesttech" type="host">cm.everesttech.net</value>
<value id="adobe" type="host">*.adobe.com</value>
</values>
</policy>
<policy id="connect-src">
Expand All @@ -27,9 +34,15 @@
<value id="omtrdc" type="host">amcglobal.sc.omtrdc.net</value>
</values>
</policy>
<policy id="media-src">
<values>
<value id="adobe" type="host">*.adobe.com</value>
</values>
</policy>
<policy id="frame-src">
<values>
<value id="amcdemdex" type="host">fast.amc.demdex.net</value>
<value id="adobe" type="host">*.adobe.com</value>
</values>
</policy>
</policies>
Expand Down
3 changes: 3 additions & 0 deletions app/code/Magento/AdminAnalytics/i18n/en_US.csv
@@ -0,0 +1,3 @@
"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"
"<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>"

Expand Up @@ -19,4 +19,4 @@
</block>
</referenceContainer>
</body>
</page>
</page>
Expand Up @@ -49,7 +49,7 @@
<state>true</state>
<options>
<option name="modalClass" xsi:type="string">admin-usage-notification</option>
<option name="title" xsi:type="string" translate="true">Allow admin usage data collection</option>
<option name="title" xsi:type="string" translate="true">Allow Adobe to collect usage data to improve user experience and offer in-product guidance</option>
<option name="autoOpen" xsi:type="boolean">true</option>
<option name="type" xsi:type="string">popup</option>
<option name="clickableOverlay" xsi:type="boolean">false</option>
Expand Down Expand Up @@ -82,11 +82,7 @@
<item name="config" xsi:type="array">
<item name="label" xsi:type="string"/>
<item name="additionalClasses" xsi:type="string">release-notification-text</item>
<item name="text" xsi:type="string" translate="true"><![CDATA[
<p>Help us improve Magento Admin by allowing us to collect usage data.</p>
<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>
<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>
]]></item>
<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>
</item>
</argument>
</container>
Expand Down
Expand Up @@ -101,6 +101,8 @@ protected function _getConfigUrl()
*/
public function getIdentity()
{
// md5() here is not for cryptographic use.
// phpcs:ignore Magento2.Security.InsecureFunction
return md5('BASE_URL' . $this->_getConfigUrl());
}

Expand Down
Expand Up @@ -62,6 +62,8 @@ protected function _getCacheTypesForRefresh()
*/
public function getIdentity()
{
// md5() here is not for cryptographic use.
// phpcs:ignore Magento2.Security.InsecureFunction
return md5('cache' . implode(':', $this->_getCacheTypesForRefresh()));
}

Expand Down

0 comments on commit 7cf5fee

Please sign in to comment.