Skip to content

Commit 49e79e6

Browse files
authored
Merge branch '2.4-develop' into integration-tests-mainline
2 parents 98248e3 + 9187ec1 commit 49e79e6

File tree

168 files changed

+1027
-378
lines changed

Some content is hidden

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

168 files changed

+1027
-378
lines changed

.github/CONTRIBUTING.md

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

1616
## Contribution requirements
1717

18-
1. Contributions must adhere to the [Magento coding standards](https://devdocs.magento.com/guides/v2.4/coding-standards/bk-coding-standards.html).
18+
1. Contributions must adhere to the [Magento coding standards](https://developer.adobe.com/commerce/php/coding-standards/).
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.
2020
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.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ However, for those who need a full-featured eCommerce solution, we recommend [Ad
2626

2727
## Contribute
2828

29-
Our [Community](https://opensource.magento.com/) is large and diverse, and our project is enormous. As a contributor, you have countless opportunities to impact product development and delivery by introducing new features or improving existing ones, enhancing test coverage, updating documentation for [developers](https://devdocs.magento.com/) and [end-users](https://docs.magento.com/user-guide/), catching and fixing code bugs, suggesting points for optimization, and sharing your great ideas.
29+
Our [Community](https://opensource.magento.com/) is large and diverse, and our project is enormous. As a contributor, you have countless opportunities to impact product development and delivery by introducing new features or improving existing ones, enhancing test coverage, updating documentation for [developers](https://developer.adobe.com/commerce/docs/) and [end-users](https://docs.magento.com/user-guide/), catching and fixing code bugs, suggesting points for optimization, and sharing your great ideas.
3030

3131
- [Contribute to the code](https://developer.adobe.com/commerce/contributor/guides/code-contributions/)
3232
- [Report an issue](https://developer.adobe.com/commerce/contributor/guides/code-contributions/#report)
@@ -36,7 +36,7 @@ Our [Community](https://opensource.magento.com/) is large and diverse, and our p
3636

3737
### Maintainers
3838

39-
We encourage experts from the Community to help us with GitHub routines such as accepting, merging, or rejecting pull requests and reviewing issues. Adobe has granted the Community Maintainers permission to accept, merge, and reject pull requests, as well as review issues. Thanks to invaluable input from the Community Maintainers team, we can significantly improve contribution quality and accelerate the time to deliver your updates to production.
39+
We encourage experts from the Community to help us with GitHub routines such as accepting, merging, or rejecting pull requests and reviewing issues. Adobe has granted the Community Maintainers permission to accept, merge, and reject pull requests, as well as review issues. Thanks to invaluable input from the Community Maintainers team, we can significantly improve contribution quality and accelerate the time to deliver your updates to production.
4040

4141
- [Learn more about the Maintainer role](https://developer.adobe.com/commerce/contributor/guides/maintainers/)
4242
- [Maintainer's Handbook](https://developer.adobe.com/commerce/contributor/guides/maintainers/handbook/)
@@ -64,9 +64,9 @@ Stay up-to-date on the latest security news and patches by signing up for [Secur
6464
## Licensing
6565

6666
Each Magento source file included in this distribution is licensed under OSL 3.0 or the terms and conditions of the applicable ordering document between Licensee/Customer and Adobe (or Magento).
67-
67+
6868
[Open Software License (OSL 3.0)](https://opensource.org/licenses/osl-3.0.php) – Please see [LICENSE.txt](LICENSE.txt) for the full text of the OSL 3.0 license.
69-
69+
7070
Subject to Licensee's/Customer's payment of fees and compliance with the terms and conditions of the applicable ordering document between Licensee/Customer and Adobe (or Magento), the terms and conditions of the applicable ordering between Licensee/Customer and Adobe (or Magento) supersede the OSL 3.0 license for each source file.
7171

7272
## Communications

app/bootstrap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 80100) {
1818
if (PHP_SAPI == 'cli') {
1919
echo 'Magento supports PHP 8.1.0 or later. ' .
20-
'Please read https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements-tech.html';
20+
'Please read https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html';
2121
} else {
2222
echo <<<HTML
2323
<div style="font:12px/1.35em arial, helvetica, sans-serif;">
2424
<p>Magento supports PHP 8.1.0 or later. Please read
25-
<a target="_blank" href="https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements-tech.html">
25+
<a target="_blank" href="https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html">
2626
Magento System Requirements</a>.
2727
</div>
2828
HTML;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
The Magento\AdminAnalytics module gathers information about the features Magento administrators use. This information will be used to help improve the user experience on the Magento Admin.
1+
The Magento\AdminAnalytics module gathers information about the features Magento administrators use. This information will be used to help improve the user experience on the Magento Admin.

app/code/Magento/AwsS3/Driver/AwsS3.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public function deleteDirectory($path): bool
257257
/**
258258
* @inheritDoc
259259
*/
260-
public function filePutContents($path, $content, $mode = null): int
260+
public function filePutContents($path, $content, $mode = null): bool|int
261261
{
262262
$path = $this->normalizeRelativePath($path, true);
263263
$config = self::CONFIG;
@@ -272,10 +272,11 @@ public function filePutContents($path, $content, $mode = null): int
272272

273273
try {
274274
$this->adapter->write($path, $content, new Config($config));
275-
return $this->adapter->fileSize($path)->fileSize();
275+
return ($this->adapter->fileSize($path)->fileSize() !== null)??true;
276+
276277
} catch (FlysystemFilesystemException | UnableToRetrieveMetadata $e) {
277278
$this->logger->error($e->getMessage());
278-
return 0;
279+
return false;
279280
}
280281
}
281282

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminAwsS3SyncZeroByteFilesTest">
12+
<annotations>
13+
<features value="AwsS3"/>
14+
<stories value="zero byte files are synced"/>
15+
<title value="S3 - Verify zero byte files are synced"/>
16+
<description value="Verifies that zero byte files are synced to AWS S3 with error."/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="AC-8252"/>
19+
<useCaseId value="ACP2E-1608"/>
20+
<group value="remote_storage_aws_s3"/>
21+
<group value="skip_in_cloud_native_s3"/>
22+
<group value="remote_storage_disabled"/>
23+
</annotations>
24+
25+
<before>
26+
<!-- Enable AWS S3 Remote Storage & Sync -->
27+
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage"/>
28+
<!-- Copy Images to Import Directory for Product Images -->
29+
<helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="copy" stepKey="copyProductBaseImage">
30+
<argument name="source">dev/tests/acceptance/tests/_data/empty.jpg</argument>
31+
<argument name="destination">pub/media/empty.jpg</argument>
32+
</helper>
33+
</before>
34+
35+
<after>
36+
<!-- Delete Images on Local File System -->
37+
<helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="deleteFileIfExists" stepKey="deleteLocalImage">
38+
<argument name="filePath">pub/media/empty.jpg</argument>
39+
</helper>
40+
<!-- Delete Images on S3 System -->
41+
<helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="deleteFileIfExists" stepKey="deleteS3Image">
42+
<argument name="filePath">pub/media/empty.jpg</argument>
43+
</helper>
44+
<!-- Disable AWS S3 Remote Storage -->
45+
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage"/>
46+
</after>
47+
<magentoCLI command="remote-storage:sync" timeout="120" stepKey="syncRemoteStorage"/>
48+
<assertEquals stepKey="assertConfigTest">
49+
<expectedResult type="string">Uploading media files to remote storage.\n- empty.jpg\nEnd of upload.</expectedResult>
50+
<actualResult type="variable">$syncRemoteStorage</actualResult>
51+
</assertEquals>
52+
53+
</test>
54+
</tests>

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*
1616
* @api
1717
* @deprecated 100.2.0 in favour of UI component implementation
18+
* @see don't recommend this approach in favour of UI component implementation
1819
* @since 100.0.2
1920
*/
2021
class Action extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Text
@@ -132,14 +133,16 @@ protected function _toLinkHtml($action, \Magento\Framework\DataObject $row)
132133
}
133134

134135
if (empty($action['id'])) {
135-
$action['id'] = 'id' .$this->random->getRandomString(10);
136+
$action['id'] = 'id' . $this->random->getRandomString(10);
136137
}
137138
$actionAttributes->setData($action);
138139
$onclick = $actionAttributes->getData('onclick');
139140
$style = $actionAttributes->getData('style');
140141
$actionAttributes->unsetData(['onclick', 'style']);
141142
$html = '<a ' . $actionAttributes->serialize() . '>' . $actionCaption . '</a>';
142143
if ($onclick) {
144+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
145+
$onclick = html_entity_decode($onclick);
143146
$html .= $this->secureHtmlRenderer->renderEventListenerAsTag('onclick', $onclick, "#{$action['id']}");
144147
}
145148
if ($style) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
The CacheInvalidate module is used to invalidate the Varnish cache if it is configured.
2-
It listens for events that request the cache to be flushed or cause the cache to be invalid, then sends Varnish a purge request using cURL.
2+
It listens for events that request the cache to be flushed or cause the cache to be invalid, then sends Varnish a purge request using cURL.

app/code/Magento/Captcha/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
The Captcha module allows applying Turing test in the process of user authentication or similar tasks.
1+
The Captcha module allows applying Turing test in the process of user authentication or similar tasks.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
The CardinalCommerce module provides a possibility to enable 3-D Secure 2.0 support for payment methods.
1+
The CardinalCommerce module provides a possibility to enable 3-D Secure 2.0 support for payment methods.

app/code/Magento/Catalog/README.md

Lines changed: 62 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
#Magento_Catalog
1+
# Magento_Catalog
2+
23
Magento_Catalog module functionality is represented by the following sub-systems:
3-
- Products Management. It includes CRUD operation of product, product media, product attributes, etc...
4-
- Category Management. It includes CRUD operation of category, category attributes
4+
5+
- Products Management. It includes CRUD operation of product, product media, product attributes, etc...
6+
- Category Management. It includes CRUD operation of category, category attributes
57

68
Catalog module provides mechanism for creating new product type in the system.
79
Catalog module provides API filtering that allows to limit product selection with advanced filters.
@@ -12,61 +14,61 @@ Catalog module provides API filtering that allows to limit product selection wit
1214
(https://developer.adobe.com/commerce/php/development/build/component-file-structure/).
1315

1416
## Observer
17+
1518
This module observes the following events:
16-
`etc/events.xml`
17-
`magento_catalog_api_data_productinterface_save_before` event in
18-
`Magento\Framework\EntityManager\Observer\BeforeEntitySave` file.
19-
`magento_catalog_api_data_productinterface_save_after` event in
20-
`Magento\Framework\EntityManager\Observer\AfterEntitySave` file.
21-
`magento_catalog_api_data_productinterface_delete_before` event in
22-
`Magento\Framework\EntityManager\Observer\BeforeEntityDelete` file.
23-
`magento_catalog_api_data_productinterface_delete_after` event in
24-
`Magento\Framework\EntityManager\Observer\AfterEntityDelete` file.
25-
`magento_catalog_api_data_productinterface_load_after` event in
26-
`Magento\Framework\EntityManager\Observer\AfterEntityLoad` file.
27-
`magento_catalog_api_data_categoryinterface_save_before` event in
28-
`Magento\Framework\EntityManager\Observer\BeforeEntitySave` file.
29-
`magento_catalog_api_data_categoryinterface_save_after` event in
30-
`Magento\Framework\EntityManager\Observer\AfterEntitySave` file.
31-
`magento_catalog_api_data_categoryinterface_save_after` event in
32-
`Magento\Catalog\Observer\InvalidateCacheOnCategoryDesignChange` file.
33-
`magento_catalog_api_data_categoryinterface_delete_before` event in
34-
`Magento\Framework\EntityManager\Observer\BeforeEntityDelete` file.
35-
`magento_catalog_api_data_categoryinterface_delete_after` event in
36-
`Magento\Framework\EntityManager\Observer\AfterEntityDelete` file.
37-
`magento_catalog_api_data_categoryinterface_load_after` event in
38-
`Magento\Framework\EntityManager\Observer\AfterEntityLoad` file.
39-
`magento_catalog_api_data_categorytreeinterface_save_before` event in
40-
`Magento\Framework\EntityManager\Observer\BeforeEntitySave` file.
41-
`magento_catalog_api_data_categorytreeinterface_save_after` event in
42-
`Magento\Framework\EntityManager\Observer\AfterEntitySave` file.
43-
`magento_catalog_api_data_categorytreeinterface_delete_before` event in
44-
`Magento\Framework\EntityManager\Observer\BeforeEntityDelete` file.
45-
`magento_catalog_api_data_categorytreeinterface_delete_after` event in
46-
`Magento\Framework\EntityManager\Observer\AfterEntityDelete` file.
47-
`magento_catalog_api_data_categorytreeinterface_load_after` event in
48-
`Magento\Framework\EntityManager\Observer\AfterEntityLoad` file.
49-
`admin_system_config_changed_section_catalog` event in
50-
`Magento\Catalog\Observer\SwitchPriceAttributeScopeOnConfigChange` file.
51-
`catalog_product_save_before` event in
52-
`Magento\Catalog\Observer\SetSpecialPriceStartDate` file.
53-
`store_save_after` event in
54-
`Magento\Catalog\Observer\SynchronizeWebsiteAttributesOnStoreChange` file.
55-
`catalog_product_save_commit_after` event in
56-
`Magento\Catalog\Observer\ImageResizeAfterProductSave` file.
57-
`catalog_category_prepare_save` event in
58-
`Magento\Catalog\Observer\CategoryDesignAuthorization` file.
59-
60-
`/etc/frontend/events.xml`
61-
`customer_login` event in
62-
`Magento\Catalog\Observer\Compare\BindCustomerLoginObserver` file.
63-
`customer_logout` event in
64-
`Magento\Catalog\Observer\Compare\BindCustomerLogoutObserver` file.
65-
66-
`/etc/adminhtml/events.xml`
67-
`cms_wysiwyg_images_static_urls_allowed` event in
68-
`Magento\Catalog\Observer\CatalogCheckIsUsingStaticUrlsAllowedObserver` file.
69-
`catalog_category_change_products` event in
70-
`Magento\Catalog\Observer\CategoryProductIndexer` file.
71-
`category_move` event in
72-
`Magento\Catalog\Observer\FlushCategoryPagesCache`
19+
20+
- `etc/events.xml`
21+
- `magento_catalog_api_data_productinterface_save_before` event in
22+
`Magento\Framework\EntityManager\Observer\BeforeEntitySave` file.
23+
- `magento_catalog_api_data_productinterface_save_after` event in
24+
`Magento\Framework\EntityManager\Observer\AfterEntitySave` file.
25+
- `magento_catalog_api_data_productinterface_delete_before` event in
26+
`Magento\Framework\EntityManager\Observer\BeforeEntityDelete` file.
27+
- `magento_catalog_api_data_productinterface_delete_after` event in
28+
`Magento\Framework\EntityManager\Observer\AfterEntityDelete` file.
29+
- `magento_catalog_api_data_productinterface_load_after` event in
30+
`Magento\Framework\EntityManager\Observer\AfterEntityLoad` file.
31+
- `magento_catalog_api_data_categoryinterface_save_before` event in
32+
`Magento\Framework\EntityManager\Observer\BeforeEntitySave` file.
33+
- `magento_catalog_api_data_categoryinterface_save_after` event in
34+
`Magento\Framework\EntityManager\Observer\AfterEntitySave` file.
35+
- `magento_catalog_api_data_categoryinterface_save_after` event in
36+
`Magento\Catalog\Observer\InvalidateCacheOnCategoryDesignChange` file.
37+
- `magento_catalog_api_data_categoryinterface_delete_before` event in
38+
`Magento\Framework\EntityManager\Observer\BeforeEntityDelete` file.
39+
- `magento_catalog_api_data_categoryinterface_delete_after` event in
40+
`Magento\Framework\EntityManager\Observer\AfterEntityDelete` file.
41+
- `magento_catalog_api_data_categoryinterface_load_after` event in
42+
`Magento\Framework\EntityManager\Observer\AfterEntityLoad` file.
43+
- `magento_catalog_api_data_categorytreeinterface_save_before` event in
44+
`Magento\Framework\EntityManager\Observer\BeforeEntitySave` file.
45+
- `magento_catalog_api_data_categorytreeinterface_save_after` event in
46+
`Magento\Framework\EntityManager\Observer\AfterEntitySave` file.
47+
- `magento_catalog_api_data_categorytreeinterface_delete_before` event in
48+
`Magento\Framework\EntityManager\Observer\BeforeEntityDelete` file.
49+
- `magento_catalog_api_data_categorytreeinterface_delete_after` event in
50+
`Magento\Framework\EntityManager\Observer\AfterEntityDelete` file.
51+
- `magento_catalog_api_data_categorytreeinterface_load_after` event in
52+
`Magento\Framework\EntityManager\Observer\AfterEntityLoad` file.
53+
`admin_system_config_changed_section_catalog` event in
54+
`Magento\Catalog\Observer\SwitchPriceAttributeScopeOnConfigChange` file.
55+
- `catalog_product_save_before` event in
56+
`Magento\Catalog\Observer\SetSpecialPriceStartDate` file.
57+
`store_save_after` event in
58+
`Magento\Catalog\Observer\SynchronizeWebsiteAttributesOnStoreChange` file.
59+
- `catalog_product_save_commit_after` event in
60+
`Magento\Catalog\Observer\ImageResizeAfterProductSave` file.
61+
- `catalog_category_prepare_save` event in
62+
`Magento\Catalog\Observer\CategoryDesignAuthorization` file.
63+
- `/etc/frontend/events.xml`
64+
- `customer_login` event in
65+
`Magento\Catalog\Observer\Compare\BindCustomerLoginObserver` file.
66+
- `customer_logout` event in
67+
`Magento\Catalog\Observer\Compare\BindCustomerLogoutObserver` file.
68+
- `/etc/adminhtml/events.xml`
69+
`cms_wysiwyg_images_static_urls_allowed` event in
70+
`Magento\Catalog\Observer\CatalogCheckIsUsingStaticUrlsAllowedObserver` file.
71+
- `catalog_category_change_products` event in
72+
`Magento\Catalog\Observer\CategoryProductIndexer` file.
73+
- `category_move` event in
74+
`Magento\Catalog\Observer\FlushCategoryPagesCache`
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# CatalogCmsGraphQl
22

3-
**CatalogCmsGraphQl** provides type and resolver information for GraphQL attributes that have dependencies on the Catalog and Cms modules.
3+
**CatalogCmsGraphQl** provides type and resolver information for GraphQL attributes that have dependencies on the Catalog and Cms modules.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# CatalogCustomerGraphQl
22

3-
**CatalogCustomerGraphQl** provides type and resolver information for GraphQL attributes that have dependences on the Catalog and Customer modules.
3+
**CatalogCustomerGraphQl** provides type and resolver information for GraphQL attributes that have dependences on the Catalog and Customer modules.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# CatalogRuleGraphQl
22

3-
The *Magento_CatalogRuleGraphQl* module applies catalog rules to products for GraphQL requests.
3+
The *Magento_CatalogRuleGraphQl* module applies catalog rules to products for GraphQL requests.

0 commit comments

Comments
 (0)