forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request magento#729 from magento-engcom/enhanced-declarati…
…ve-schema-compatibility Enhanced Declarative Schema Compatibility
- Loading branch information
Showing
22 changed files
with
266 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
app/code/Magento/InventoryCatalog/Setup/Patch/Schema/ReindexDefaultSource.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\InventoryCatalog\Setup\Patch\Schema; | ||
|
||
use Magento\Framework\Setup\Patch\SchemaPatchInterface; | ||
use Magento\InventoryCatalog\Setup\Operation\ReindexDefaultStock as Operation; | ||
|
||
/** | ||
* Patch Inventory Source Items with Inventory Stock Item Data | ||
*/ | ||
class ReindexDefaultSource implements SchemaPatchInterface | ||
{ | ||
/** | ||
* @var Operation | ||
*/ | ||
private $operation; | ||
|
||
/** | ||
* @param Operation $operation | ||
*/ | ||
public function __construct(Operation $operation) | ||
{ | ||
$this->operation = $operation; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function apply() | ||
{ | ||
$this->operation->execute(); | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public static function getDependencies() | ||
{ | ||
return [ | ||
UpdateInventorySourceItem::class | ||
]; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getAliases() | ||
{ | ||
return []; | ||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
app/code/Magento/InventoryCatalog/Setup/Patch/Schema/UpdateInventorySourceItem.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\InventoryCatalog\Setup\Patch\Schema; | ||
|
||
use Magento\Framework\Setup\ModuleDataSetupInterface; | ||
use Magento\Framework\Setup\Patch\SchemaPatchInterface; | ||
use Magento\InventoryCatalog\Setup\Operation\UpdateInventorySourceItem as Operation; | ||
|
||
/** | ||
* Patch Inventory Source Items with Inventory Stock Item Data | ||
*/ | ||
class UpdateInventorySourceItem implements SchemaPatchInterface | ||
{ | ||
/** | ||
* @var ModuleDataSetupInterface | ||
*/ | ||
private $moduleDataSetup; | ||
|
||
/** | ||
* @var Operation | ||
*/ | ||
private $operation; | ||
|
||
/** | ||
* @param ModuleDataSetupInterface $moduleDataSetup | ||
* @param Operation $operation | ||
*/ | ||
public function __construct( | ||
ModuleDataSetupInterface $moduleDataSetup, | ||
Operation $operation | ||
) { | ||
$this->moduleDataSetup = $moduleDataSetup; | ||
$this->operation = $operation; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function apply() | ||
{ | ||
$this->operation->execute($this->moduleDataSetup); | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public static function getDependencies() | ||
{ | ||
return [ | ||
InitializeDefaultStock::class, | ||
]; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getAliases() | ||
{ | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.