Skip to content

Commit 559d0f8

Browse files
committed
Test case failures fix
1 parent 841ffaa commit 559d0f8

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

app/code/Magento/CatalogInventory/Block/Plugin/ProductView.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*/
66
namespace Magento\CatalogInventory\Block\Plugin;
77

8+
use Magento\Catalog\Block\Product\View;
89
use Magento\CatalogInventory\Model\Product\QuantityValidator;
9-
use Magento\Framework\App\ObjectManager;
1010

1111
class ProductView
1212
{
@@ -16,25 +16,23 @@ class ProductView
1616
private $productQuantityValidator;
1717

1818
/**
19-
* @param QuantityValidator|null $productQuantityValidator
19+
* @param QuantityValidator $productQuantityValidator
2020
*/
2121
public function __construct(
22-
QuantityValidator $productQuantityValidator = null
22+
QuantityValidator $productQuantityValidator
2323
) {
24-
$this->productQuantityValidator = $productQuantityValidator ?: ObjectManager::getInstance()->get(
25-
QuantityValidator::class
26-
);
24+
$this->productQuantityValidator = $productQuantityValidator;
2725
}
2826

2927
/**
3028
* Adds quantities validator.
3129
*
32-
* @param \Magento\Catalog\Block\Product\View $block
30+
* @param View $block
3331
* @param array $validators
3432
* @return array
3533
*/
3634
public function afterGetQuantityValidators(
37-
\Magento\Catalog\Block\Product\View $block,
35+
View $block,
3836
array $validators
3937
) {
4038
return array_merge(

app/code/Magento/CatalogInventory/composer.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
"php": "~8.2.0||~8.3.0||~8.4.0",
99
"magento/framework": "*",
1010
"magento/module-catalog": "*",
11-
"magento/module-inventory-configuration-api": "*",
12-
"magento/module-inventory-sales-api": "*",
1311
"magento/module-config": "*",
1412
"magento/module-customer": "*",
1513
"magento/module-eav": "*",

0 commit comments

Comments
 (0)