Skip to content

Commit 7490a28

Browse files
Roman HaninRoman Hanin
authored andcommitted
Merge branch '2.4-develop' of https://github.com/magento/magento2ce into B2B-1610
2 parents bb5b08b + 9756182 commit 7490a28

File tree

133 files changed

+1378
-44659
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

+1378
-44659
lines changed

app/code/Magento/Backend/view/adminhtml/templates/media/uploader.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
// phpcs:disable PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound
78
/** @var $block \Magento\Backend\Block\Media\Uploader */
89
?>
910

app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
/** @var $block \Magento\Backend\Block\GlobalSearch */
7+
// phpcs:disable PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound
8+
9+
use Magento\Backend\Block\GlobalSearch;
10+
use Magento\Framework\Json\Helper\Data;
11+
12+
/** @var $block GlobalSearch */
13+
/** @var Data $helper */
14+
$helper = $this->helper(Data::class);
15+
816
?>
917
<div class="search-global" data-mage-init='{"globalSearch": {}}'>
1018
<form action="#" id="form-search">
@@ -15,9 +23,7 @@
1523
class="search-global-input"
1624
id="search-global"
1725
name="query"
18-
<?php //phpcs:disable ?>
19-
data-mage-init='<?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getWidgetInitOptions()) ?>'>
20-
<?php //phpcs:enable ?>
26+
data-mage-init='<?= /* @noEscape */ $helper->jsonEncode($block->getWidgetInitOptions()) ?>'>
2127
<button
2228
type="submit"
2329
class="search-global-action"

app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* See COPYING.txt for license details.
55
*/
66
// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
7+
// phpcs:disable PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound
78
/** @var $block \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option */
89
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
910
?>

app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
// phpcs:disable PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound
78
/** @var $block \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option\Selection */
89
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
910
?>

app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/summary.phtml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
?>
76

8-
<?php
9-
$_product = $block->getProduct();
7+
// phpcs:disable PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound
8+
$_product = $block->getProduct();
109
?>
1110
<?php if ($_product->isSaleable() && $block->hasOptions()) : ?>
1211
<div id="bundleSummary"

app/code/Magento/Captcha/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
"magento/module-customer": "*",
1313
"magento/module-store": "*",
1414
"magento/module-authorization": "*",
15-
"laminas/laminas-captcha": "^2.7.1",
15+
"laminas/laminas-captcha": "^2.10",
1616
"laminas/laminas-db": "^2.8.2",
17-
"laminas/laminas-session": "^2.7.3"
17+
"laminas/laminas-session": "^2.10"
1818
},
1919
"type": "magento2-module",
2020
"license": [

app/code/Magento/Catalog/Ui/DataProvider/Product/ProductCollection.php

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -25,58 +25,4 @@ protected function _productLimitationJoinPrice()
2525
$this->_productLimitationFilters->setUsePriceIndex(false);
2626
return $this->_productLimitationPrice(true);
2727
}
28-
29-
/**
30-
* Return approximately amount if too much entities.
31-
*
32-
* @return int|mixed
33-
*/
34-
public function getSize()
35-
{
36-
$sql = $this->getSelectCountSql();
37-
$possibleCount = $this->analyzeCount($sql);
38-
39-
if ($possibleCount > 20000) {
40-
return $possibleCount;
41-
}
42-
43-
return parent::getSize();
44-
}
45-
46-
/**
47-
* Analyze amount of entities in DB.
48-
*
49-
* @param $sql
50-
* @return int|mixed
51-
* @throws \Zend_Db_Statement_Exception
52-
*/
53-
private function analyzeCount($sql)
54-
{
55-
$results = $this->getConnection()->query('EXPLAIN ' . $sql)->fetchAll();
56-
$alias = $this->getMainTableAlias();
57-
58-
foreach ($results as $result) {
59-
if ($result['table'] == $alias) {
60-
return $result['rows'];
61-
}
62-
}
63-
64-
return 0;
65-
}
66-
67-
/**
68-
* Identify main table alias or its name if alias is not defined.
69-
*
70-
* @return string
71-
* @throws \LogicException
72-
*/
73-
private function getMainTableAlias()
74-
{
75-
foreach ($this->getSelect()->getPart(\Magento\Framework\DB\Select::FROM) as $tableAlias => $tableMetadata) {
76-
if ($tableMetadata['joinType'] == 'from') {
77-
return $tableAlias;
78-
}
79-
}
80-
throw new \LogicException("Main table cannot be identified.");
81-
}
8228
}

app/code/Magento/Catalog/ViewModel/Product/Checker/AddToCompareAvailability.php

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
namespace Magento\Catalog\ViewModel\Product\Checker;
99

10-
use Magento\Framework\View\Element\Block\ArgumentInterface;
1110
use Magento\Catalog\Api\Data\ProductInterface;
12-
use Magento\CatalogInventory\Api\StockConfigurationInterface;
1311
use Magento\Catalog\Model\Product\Attribute\Source\Status;
12+
use Magento\CatalogInventory\Api\StockConfigurationInterface;
13+
use Magento\Framework\View\Element\Block\ArgumentInterface;
1414

1515
/**
1616
* Check is available add to compare.
@@ -39,25 +39,9 @@ public function __construct(StockConfigurationInterface $stockConfiguration)
3939
public function isAvailableForCompare(ProductInterface $product): bool
4040
{
4141
if ((int)$product->getStatus() !== Status::STATUS_DISABLED) {
42-
return $this->isInStock($product) || $this->stockConfiguration->isShowOutOfStock();
42+
return $product->isSalable() || $this->stockConfiguration->isShowOutOfStock();
4343
}
4444

4545
return false;
4646
}
47-
48-
/**
49-
* Get is in stock status.
50-
*
51-
* @param ProductInterface $product
52-
* @return bool
53-
*/
54-
private function isInStock(ProductInterface $product): bool
55-
{
56-
$quantityAndStockStatus = $product->getQuantityAndStockStatus();
57-
if (!$quantityAndStockStatus) {
58-
return $product->isSalable();
59-
}
60-
61-
return $quantityAndStockStatus['is_in_stock'] ?? false;
62-
}
6347
}

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
// phpcs:disable PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound
78
/** @var $block \Magento\Eav\Block\Adminhtml\Attribute\Edit\Options\Options */
89

910
$stores = $block->getStoresSortedBySortOrder();

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
8+
// phpcs:disable PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound
89

910
/* @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\AttributeSet */
1011
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */

0 commit comments

Comments
 (0)