Skip to content

Commit 9c98c65

Browse files
Merge branch '2.4-develop' into remove-redundant-methods-1
2 parents 610c638 + f0c8088 commit 9c98c65

File tree

297 files changed

+8413
-2531
lines changed

Some content is hidden

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

297 files changed

+8413
-2531
lines changed

app/code/Magento/AdminAnalytics/Test/Mftf/Test/AdminCheckAnalyticsTrackingTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

@@ -16,6 +16,7 @@
1616
<severity value="MINOR"/>
1717
<testCaseId value="MC-36869"/>
1818
<group value="pr_exclude"/>
19+
<group value="all_bundled_only"/>
1920
</annotations>
2021
<before>
2122
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>

app/code/Magento/AsyncConfig/Test/Mftf/Test/AsyncConfigurationTest.xml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
6-
*/
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
6+
*/
77
-->
88
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
@@ -59,8 +59,10 @@
5959
<see selector="{{CatalogSection.successMessage}}" userInput="Configuration changes will be applied by consumer soon." stepKey="seeCustomSuccessMessage"/>
6060

6161
<!--Trigger the Consumer-->
62-
<magentoCLI stepKey="EnableAsyncConfig" command="queue:consumers:start saveConfigProcessor --max-messages=1"/>
63-
62+
<actionGroup ref="CliConsumerStartActionGroup" stepKey="EnableAsyncConfig">
63+
<argument name="consumerName" value="saveConfigProcessor"/>
64+
<argument name="maxMessages" value="1"/>
65+
</actionGroup>
6466
<!--Open Configuration Page Again-->
6567
<amOnPage url="{{CatalogConfigPage.url}}" stepKey="navigateToConfigurationPageAgain" />
6668
<waitForPageLoad stepKey="waitForPageLoadAgain"/>
Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,31 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
6-
*/
3+
/************************************************************************
4+
*
5+
* ADOBE CONFIDENTIAL
6+
* ___________________
7+
*
8+
* Copyright 2025 Adobe
9+
* All Rights Reserved.
10+
*
11+
* NOTICE: All information contained herein is, and remains
12+
* the property of Adobe and its suppliers, if any. The intellectual
13+
* and technical concepts contained herein are proprietary to Adobe
14+
* and its suppliers and are protected by all applicable intellectual
15+
* property laws, including trade secret and copyright laws.
16+
* Dissemination of this information or reproduction of this material
17+
* is strictly forbidden unless prior written permission is obtained
18+
* from Adobe.
19+
* ************************************************************************
20+
*/
721
-->
822

923
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1024
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
1125
<entity name="backendDataOne" type="backend">
1226
<data key="backendConfigName">data</data>
1327
</entity>
28+
<entity name="WebdriverKey">
29+
<data key="tabKey">[\Facebook\WebDriver\WebDriverKeys::TAB]</data>
30+
</entity>
1431
</entities>

app/code/Magento/CacheInvalidate/Test/Mftf/Test/AdminValidateEAVTypesAndAttributesConfigurationTest.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020
</annotations>
2121
<before>
2222
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23-
<actionGroup ref="AdminGoToCacheManagementPageActionGroup" stepKey="goToCacheManagementPage"/>
24-
<!--Verify Cache Type EAV Types And Attributes Is ENABLED -->
25-
<waitForText selector="{{AdminMessagesSection.assertCacheManagementStatusEnabled('EAV')}}" userInput="ENABLED" stepKey="verifyCacheTypeEAVTypesAndAttributesIsENABLED"/>
23+
<comment userInput="BIC Workaround" stepKey="goToCacheManagementPage" />
24+
<magentoCLI command="cache:enable" arguments="eav" stepKey="verifyCacheTypeEAVTypesAndAttributesIsENABLED"/>
2625
</before>
2726
<after>
2827
<!--Delete created entity -->
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
/**
3+
* Copyright 2025 Adobe.
4+
* All Rights Reserved.
5+
*/
6+
7+
declare(strict_types=1);
8+
namespace Magento\Captcha\Block;
9+
10+
use Magento\Checkout\Block\Checkout\LayoutProcessorInterface;
11+
use Magento\Captcha\Helper\Data as HelperCaptcha;
12+
13+
class CheckoutLayoutProcessor implements LayoutProcessorInterface
14+
{
15+
/**
16+
* @param HelperCaptcha $helper
17+
*/
18+
public function __construct(
19+
private readonly HelperCaptcha $helper
20+
) {
21+
}
22+
23+
/**
24+
* Remove captcha from checkout page if it is disabled
25+
*
26+
* @param array $jsLayout
27+
* @return array
28+
*/
29+
public function process($jsLayout): array
30+
{
31+
if ($this->helper->getConfig('enable')) {
32+
$captcha = [
33+
'component' => 'Magento_Captcha/js/view/checkout/loginCaptcha',
34+
'displayArea' => 'additional-login-form-fields',
35+
'formId' => 'user_login',
36+
'configSource' => 'checkoutConfig'
37+
];
38+
$jsLayout['components']['checkout']['children']['authentication']['children']['captcha'] = $captcha;
39+
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
40+
['shippingAddress']['children']['customer-email']['children']['additional-login-form-fields']
41+
['children']['captcha'] = $captcha;
42+
}
43+
return $jsLayout;
44+
}
45+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
/**
3+
* Copyright 2025 Adobe.
4+
* All Rights Reserved.
5+
*/
6+
7+
declare(strict_types=1);
8+
namespace Magento\Captcha\Block\Customer\AuthenticationPopup;
9+
10+
use Magento\Captcha\Helper\Data as HelperCaptcha;
11+
use Magento\Checkout\Block\Checkout\LayoutProcessorInterface;
12+
13+
class LayoutProcessor implements LayoutProcessorInterface
14+
{
15+
/**
16+
* @param HelperCaptcha $helper
17+
*/
18+
public function __construct(
19+
private readonly HelperCaptcha $helper
20+
) {
21+
}
22+
23+
/**
24+
* Process jsLayout of checkout page
25+
*
26+
* @param array $jsLayout
27+
* @return array
28+
*/
29+
public function process($jsLayout): array
30+
{
31+
if ($this->helper->getConfig('enable')) {
32+
$jsLayout['components']['authenticationPopup']['children']['captcha'] = [
33+
'component' => 'Magento_Captcha/js/view/checkout/loginCaptcha',
34+
'displayArea' => 'additional-login-form-fields',
35+
'formId' => 'user_login',
36+
'configSource' => 'checkout'
37+
];
38+
}
39+
return $jsLayout;
40+
}
41+
}

app/code/Magento/Captcha/etc/frontend/di.xml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2015 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
@@ -37,4 +37,18 @@
3737
<type name="Magento\Sales\Api\OrderManagementInterface">
3838
<plugin name="reset_payment_attempts_after_order_is_placed_plugin" type="Magento\Captcha\Plugin\ResetPaymentAttemptsAfterOrderIsPlacedPlugin"/>
3939
</type>
40+
<type name="Magento\Checkout\Block\Onepage">
41+
<arguments>
42+
<argument name="layoutProcessors" xsi:type="array">
43+
<item name="captcha_processor" xsi:type="object">Magento\Captcha\Block\CheckoutLayoutProcessor</item>
44+
</argument>
45+
</arguments>
46+
</type>
47+
<type name="Magento\Customer\Block\Account\AuthenticationPopup">
48+
<arguments>
49+
<argument name="layoutProcessors" xsi:type="array">
50+
<item name="authentication_popup_processor" xsi:type="object">Magento\Captcha\Block\Customer\AuthenticationPopup\LayoutProcessor</item>
51+
</argument>
52+
</arguments>
53+
</type>
4054
</config>

app/code/Magento/Captcha/view/frontend/layout/checkout_index_index.xml

Lines changed: 0 additions & 59 deletions
This file was deleted.

app/code/Magento/Captcha/view/frontend/layout/default.xml

Lines changed: 0 additions & 29 deletions
This file was deleted.

app/code/Magento/Catalog/Model/ResourceModel/Product/Image.php

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2018 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

88
namespace Magento\Catalog\Model\ResourceModel\Product;
99

10+
use Magento\Catalog\Api\Data\ProductInterface;
1011
use Magento\Framework\DB\Adapter\AdapterInterface;
1112
use Magento\Framework\DB\Query\Generator;
1213
use Magento\Framework\DB\Select;
1314
use Magento\Framework\App\ResourceConnection;
15+
use Magento\Framework\EntityManager\MetadataPool;
1416

1517
/**
1618
* Class for retrieval of all product images
@@ -40,11 +42,13 @@ class Image
4042
/**
4143
* @param Generator $generator
4244
* @param ResourceConnection $resourceConnection
45+
* @param MetadataPool $metadataPool
4346
* @param int $batchSize
4447
*/
4548
public function __construct(
4649
Generator $generator,
4750
ResourceConnection $resourceConnection,
51+
private readonly MetadataPool $metadataPool,
4852
$batchSize = 100
4953
) {
5054
$this->batchQueryGenerator = $generator;
@@ -152,16 +156,32 @@ private function getVisibleImagesSelect(): Select
152156
*/
153157
private function getUsedImagesSelect(): Select
154158
{
155-
return $this->connection->select()->distinct()
159+
$productMetadata = $this->metadataPool->getMetadata(ProductInterface::class);
160+
$linkField = $productMetadata->getLinkField();
161+
$identifierField = $productMetadata->getIdentifierField();
162+
163+
$select = $this->connection->select()->distinct()
156164
->from(
157165
['images' => $this->resourceConnection->getTableName(Gallery::GALLERY_TABLE)],
158166
'value as filepath'
159167
)->joinInner(
160168
['image_value' => $this->resourceConnection->getTableName(Gallery::GALLERY_VALUE_TABLE)],
161169
'images.value_id = image_value.value_id',
162170
[]
171+
)->joinInner(
172+
['products' => $this->resourceConnection->getTableName('catalog_product_entity')],
173+
"image_value.$linkField = products.$linkField",
174+
[]
175+
)->joinInner(
176+
['websites' => $this->resourceConnection->getTableName('catalog_product_website')],
177+
"products.$identifierField = websites.product_id",
178+
['GROUP_CONCAT(websites.website_id SEPARATOR \',\') AS website_ids']
163179
)->where(
164180
'images.disabled = 0 AND image_value.disabled = 0'
181+
)->group(
182+
'websites.product_id'
165183
);
184+
185+
return $select;
166186
}
167187
}

0 commit comments

Comments
 (0)