Skip to content

Commit 0fd9227

Browse files
Merge branch '2.4-develop' into ACQE-functional-deployment-v4-9
2 parents 892b068 + c127d10 commit 0fd9227

File tree

133 files changed

+3846
-1508
lines changed

Some content is hidden

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

133 files changed

+3846
-1508
lines changed

app/code/Magento/Backend/Console/Command/AbstractCacheSetCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ abstract protected function isEnable();
2727
/**
2828
* @inheritdoc
2929
*/
30-
protected function execute(InputInterface $input, OutputInterface $output)
30+
protected function execute(InputInterface $input, OutputInterface $output): int
3131
{
3232
$isEnable = $this->isEnable();
3333
$types = $this->getRequestedTypes($input);

app/code/Magento/Backend/Console/Command/AbstractCacheTypeManageCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ abstract protected function getDisplayMessage();
5858
* @param OutputInterface $output
5959
* @return int
6060
*/
61-
protected function execute(InputInterface $input, OutputInterface $output)
61+
protected function execute(InputInterface $input, OutputInterface $output): int
6262
{
6363
$types = $this->getRequestedTypes($input);
6464
$this->performAction($types);

app/code/Magento/Backend/Console/Command/CacheStatusCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected function configure()
3131
/**
3232
* @inheritdoc
3333
*/
34-
protected function execute(InputInterface $input, OutputInterface $output)
34+
protected function execute(InputInterface $input, OutputInterface $output): int
3535
{
3636
$output->writeln('Current status:');
3737
foreach ($this->cacheManager->getStatus() as $cache => $status) {

app/code/Magento/Catalog/Console/Command/ProductAttributesCleanUp.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
use Magento\Catalog\Api\Data\ProductInterface;
1212

1313
/**
14-
* Class ProductAttributesCleanUp
14+
* Console command for cleaning up unused product attributes from database tables
15+
*
1516
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1617
*/
1718
class ProductAttributesCleanUp extends \Symfony\Component\Console\Command\Command
@@ -64,7 +65,7 @@ public function __construct(
6465
}
6566

6667
/**
67-
* {@inheritdoc}
68+
* @inheritdoc
6869
*/
6970
protected function configure()
7071
{
@@ -73,9 +74,9 @@ protected function configure()
7374
}
7475

7576
/**
76-
* {@inheritdoc}
77+
* @inheritdoc
7778
*/
78-
protected function execute(InputInterface $input, OutputInterface $output)
79+
protected function execute(InputInterface $input, OutputInterface $output): int
7980
{
8081
$output->setDecorated(true);
8182
$this->appState->setAreaCode(\Magento\Framework\App\Area::AREA_GLOBAL);
@@ -113,6 +114,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
113114
}
114115

115116
/**
117+
* Get list of product attribute table names
118+
*
116119
* @return array
117120
* @throws \Magento\Framework\Exception\LocalizedException
118121
*/
@@ -134,6 +137,8 @@ private function getAttributeTables()
134137
}
135138

136139
/**
140+
* Get attribute value IDs that should be removed from the specified attribute table
141+
*
137142
* @param AdapterInterface $connection
138143
* @param string $attributeTableName
139144
* @return array

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryFromProductPageTest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="goToCategoryAdminPage"/>
5555
<actionGroup ref="AdminCategoriesExpandAllActionGroup" stepKey="expandAllCategories"/>
5656
<see userInput="{{_defaultCategory.name}}" selector="{{AdminCategorySidebarTreeSection.treeContainer}}" stepKey="assertCategoryOnAdminPage"/>
57-
57+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
58+
<argument name="indices" value=""/>
59+
</actionGroup>
5860
<!-- Check on storefront that category was created -->
5961
<actionGroup ref="StorefrontNavigateToCategoryUrlActionGroup" stepKey="goToCategoryStorefrontPage">
6062
<argument name="categoryUrl" value="{{_defaultCategory.urlKey}}"/>

app/code/Magento/Catalog/Test/Unit/Pricing/Price/RegularPriceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ protected function setUp(): void
7171
* Test method testGetValue
7272
*
7373
* @param float|bool $price
74-
* @dataProvider testGetValueDataProvider
74+
* @dataProvider getValueDataProvider
7575
*/
7676
public function testGetValue($price)
7777
{
@@ -93,7 +93,7 @@ public function testGetValue($price)
9393
*
9494
* @return array
9595
*/
96-
public static function testGetValueDataProvider()
96+
public static function getValueDataProvider()
9797
{
9898
return [
9999
'With price' => [100.00],

app/code/Magento/Checkout/view/frontend/web/js/cart/ensure-subtotal-sync.js

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ define([
1515
return function initEnsureSubtotalSync(config, element)
1616
{
1717
const $root = $(element || document);
18-
let clicked = false;
18+
19+
// Check if already synced on the body element (persists across form replacements)
20+
if ($('body').data('cart-synced')) {
21+
return;
22+
}
1923

2024
function parsePrice(text)
2125
{
@@ -44,7 +48,7 @@ define([
4448
// Sum of row totals on the table
4549
let sum = 0;
4650

47-
$root.find('#shopping-cart-table .col.subtotal .cart-price').each(function () {
51+
$root.find('#shopping-cart-table .col.subtotal .price-excluding-tax .cart-price').each(function () {
4852
const text = $(this).text(), val = parsePrice(text);
4953

5054
if (!isNaN(val)) {
@@ -70,19 +74,35 @@ define([
7074
return;
7175
}
7276

73-
if (clicked) {
74-
return;
75-
}
76-
7777
const central = getCentralSubtotal(), summary = getSummarySubtotal();
7878

7979
if (!isNaN(central) && !isNaN(summary) && central !== summary) {
80-
const $updateBtn = $root.find('.cart.main.actions button.action.update');
81-
82-
if ($updateBtn.length) {
83-
clicked = true;
84-
$updateBtn.trigger('click');
85-
}
80+
// Mark as synced immediately to prevent multiple calls
81+
$('body').data('cart-synced', true);
82+
83+
// Reload cart content via AJAX
84+
$('body').trigger('processStart');
85+
$.ajax({
86+
url: window.location.href,
87+
type: 'GET',
88+
data: { ajax: 1 },
89+
success: function (response) {
90+
// Extract and replace cart form
91+
const newContent = $(response).find('#form-validate');
92+
93+
// Replace the form with the new content
94+
$('#form-validate').replaceWith(newContent);
95+
// Reinitialize widgets on new content
96+
$('#form-validate').trigger('contentUpdated');
97+
},
98+
error: function () {
99+
$('body').trigger('processStop');
100+
$('body').data('cart-synced', false);
101+
},
102+
complete: function () {
103+
$('body').trigger('processStop');
104+
}
105+
});
86106
}
87107
}
88108

@@ -98,7 +118,7 @@ define([
98118
const obs = new MutationObserver(function () {
99119
trySync();
100120

101-
if (clicked) {
121+
if ($('body').data('cart-synced')) {
102122
obs.disconnect();
103123
}
104124
});

app/code/Magento/Cms/Command/WysiwygRestrictCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ protected function configure()
5858
/**
5959
* @inheritDoc
6060
*/
61-
protected function execute(InputInterface $input, OutputInterface $output)
61+
protected function execute(InputInterface $input, OutputInterface $output): int
6262
{
6363
$restrictArg = mb_strtolower((string)$input->getArgument('restrict'));
6464
$restrict = $restrictArg === 'y' ? '1' : '0';

app/code/Magento/Config/Console/Command/ConfigSetCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright 2017 Adobe
3+
* Copyright 2024 Adobe
44
* All Rights Reserved.
55
*/
66

@@ -159,7 +159,7 @@ protected function configure()
159159
* @throws RuntimeException
160160
* @since 101.0.0
161161
*/
162-
protected function execute(InputInterface $input, OutputInterface $output)
162+
protected function execute(InputInterface $input, OutputInterface $output): int
163163
{
164164
if (!$this->deploymentConfig->isAvailable()) {
165165
$output->writeln(

app/code/Magento/Config/Console/Command/ConfigShowCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright 2017 Adobe
3+
* Copyright 2024 Adobe
44
* All Rights Reserved.
55
*/
66
namespace Magento\Config\Console\Command;
@@ -170,7 +170,7 @@ protected function configure()
170170
* @inheritdoc
171171
* @since 101.0.0
172172
*/
173-
protected function execute(InputInterface $input, OutputInterface $output)
173+
protected function execute(InputInterface $input, OutputInterface $output): int
174174
{
175175
try {
176176
$this->scope = $input->getOption(self::INPUT_OPTION_SCOPE);

0 commit comments

Comments
 (0)