Skip to content

Commit 67a47c9

Browse files
authored
Merge pull request #5070 from magento-tsg/2.3.4-develop-pr97
[TSG] Fixes for 2.3 (pr97) (2.3.4-develop)
2 parents f3856a7 + c05360e commit 67a47c9

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

app/code/Magento/Catalog/Setup/Patch/Data/UpdateDefaultAttributeValue.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
namespace Magento\Catalog\Setup\Patch\Data;
89

910
use Magento\Catalog\Setup\CategorySetup;
1011
use Magento\Catalog\Setup\CategorySetupFactory;
11-
use Magento\Framework\App\ResourceConnection;
1212
use Magento\Framework\Setup\ModuleDataSetupInterface;
1313
use Magento\Framework\Setup\Patch\DataPatchInterface;
1414
use Magento\Framework\Setup\Patch\PatchVersionInterface;
1515

1616
/**
1717
* Class UpdateDefaultAttributeValue
18-
* @package Magento\Catalog\Setup\Patch
1918
*/
2019
class UpdateDefaultAttributeValue implements DataPatchInterface, PatchVersionInterface
2120
{
@@ -30,7 +29,6 @@ class UpdateDefaultAttributeValue implements DataPatchInterface, PatchVersionInt
3029
private $categorySetupFactory;
3130

3231
/**
33-
* PatchInitial constructor.
3432
* @param ModuleDataSetupInterface $moduleDataSetup
3533
* @param CategorySetupFactory $categorySetupFactory
3634
*/
@@ -43,17 +41,22 @@ public function __construct(
4341
}
4442

4543
/**
46-
* {@inheritdoc}
44+
* @inheritdoc
4745
*/
4846
public function apply()
4947
{
5048
/** @var CategorySetup $categorySetup */
5149
$categorySetup = $this->categorySetupFactory->create(['setup' => $this->moduleDataSetup]);
52-
$categorySetup->updateAttribute(3, 54, 'default_value', 1);
50+
$categorySetup->updateAttribute(
51+
CategorySetup::CATEGORY_ENTITY_TYPE_ID,
52+
'is_anchor',
53+
'default_value',
54+
1
55+
);
5356
}
5457

5558
/**
56-
* {@inheritdoc}
59+
* @inheritdoc
5760
*/
5861
public static function getDependencies()
5962
{
@@ -63,15 +66,15 @@ public static function getDependencies()
6366
}
6467

6568
/**
66-
* {@inheritdoc}
69+
* @inheritdoc
6770
*/
6871
public static function getVersion()
6972
{
7073
return '2.0.3';
7174
}
7275

7376
/**
74-
* {@inheritdoc}
77+
* @inheritdoc
7578
*/
7679
public function getAliases()
7780
{

0 commit comments

Comments
 (0)