Skip to content

Commit

Permalink
ENGCOM-4794: Removes usage of classes which don't exist from DB migra…
Browse files Browse the repository at this point in the history
…tion scripts. #22446
  • Loading branch information
sidolov authored Apr 24, 2019
2 parents 2eef26e + c2eb5e3 commit 962ef05
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
5 changes: 2 additions & 3 deletions app/code/Magento/Catalog/Setup/CategorySetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Magento\Catalog\Block\Adminhtml\Category\Helper\Pricestep;
use Magento\Catalog\Block\Adminhtml\Category\Helper\Sortby\Available;
use Magento\Catalog\Block\Adminhtml\Category\Helper\Sortby\DefaultSortby;
use Magento\Catalog\Block\Adminhtml\Product\Helper\Form\BaseImage;
use Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Category as CategoryFormHelper;
use Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Weight as WeightFormHelper;
use Magento\Catalog\Model\Attribute\Backend\Customlayoutupdate;
Expand Down Expand Up @@ -54,6 +53,8 @@
use Magento\Theme\Model\Theme\Source\Theme;

/**
* Setup category with default entities.
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class CategorySetup extends EavSetup
Expand Down Expand Up @@ -593,7 +594,6 @@ public function getDefaultEntities()
'label' => 'Base Image',
'input' => 'media_image',
'frontend' => ImageFrontendModel::class,
'input_renderer' => BaseImage::class,
'required' => false,
'sort_order' => 0,
'global' => ScopedAttributeInterface::SCOPE_STORE,
Expand Down Expand Up @@ -626,7 +626,6 @@ public function getDefaultEntities()
'type' => 'varchar',
'label' => 'Media Gallery',
'input' => 'gallery',
'backend' => Media::class,
'required' => false,
'sort_order' => 4,
'group' => 'Images',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@

use Magento\Directory\Model\AllowedCountries;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Directory\Model\AllowedCountriesFactory;
use Magento\Store\Model\ScopeInterface;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Framework\Setup\Patch\DataPatchInterface;
use Magento\Framework\Setup\Patch\PatchVersionInterface;

/**
* Migrate store allowed countries to website.
*/
class MigrateStoresAllowedCountriesToWebsite implements DataPatchInterface, PatchVersionInterface
{
/**
Expand All @@ -27,7 +29,7 @@ class MigrateStoresAllowedCountriesToWebsite implements DataPatchInterface, Patc
private $storeManager;

/**
* @var AllowedCountriesFactory
* @var AllowedCountries
*/
private $allowedCountries;

Expand All @@ -48,10 +50,11 @@ public function __construct(
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function apply()
{

$this->moduleDataSetup->getConnection()->beginTransaction();

try {
Expand Down Expand Up @@ -149,7 +152,7 @@ private function mergeAllowedCountries(array $countries, array $newCountries, $i
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public static function getDependencies()
{
Expand All @@ -159,15 +162,15 @@ public static function getDependencies()
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public static function getVersion()
{
return '2.0.9';
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function getAliases()
{
Expand Down

0 comments on commit 962ef05

Please sign in to comment.