Skip to content

Commit eb208da

Browse files
authored
Merge pull request magento#80 from magento-trigger/MAGETWO-87551
[trigger] MAGETWO-86717: Data Patches conversion
2 parents c7a1067 + feadefd commit eb208da

File tree

59 files changed

+1483
-696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1483
-696
lines changed

app/code/Magento/BundleSampleData/Setup/InstallData.php

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\BundleSampleData\Setup\Patch\Data;
8+
9+
use Magento\Framework\Setup;
10+
use Magento\Setup\Model\Patch\DataPatchInterface;
11+
use Magento\Setup\Model\Patch\PatchVersionInterface;
12+
13+
/**
14+
* Class InstallBundleSampleData
15+
* @package Magento\BundleSampleData\Setup\Patch\Data
16+
*/
17+
class InstallBundleSampleData implements DataPatchInterface, PatchVersionInterface
18+
{
19+
/**
20+
* @var Setup\SampleData\Executor
21+
*/
22+
protected $executor;
23+
24+
/**
25+
* @var \Magento\BundleSampleData\Setup\Installer
26+
*/
27+
protected $installer;
28+
29+
/**
30+
* InstallBundleSampleData constructor.
31+
* @param Setup\SampleData\Executor $executor
32+
* @param \Magento\BundleSampleData\Setup\Installer $installer
33+
*/
34+
public function __construct(
35+
Setup\SampleData\Executor $executor,
36+
\Magento\BundleSampleData\Setup\Installer $installer
37+
) {
38+
$this->executor = $executor;
39+
$this->installer = $installer;
40+
}
41+
42+
/**
43+
* {@inheritdoc}
44+
*/
45+
public function apply()
46+
{
47+
$this->executor->exec($this->installer);
48+
}
49+
50+
/**
51+
* {@inheritdoc}
52+
*/
53+
public static function getDependencies()
54+
{
55+
return [];
56+
}
57+
58+
/**
59+
* {@inheritdoc}
60+
*/
61+
public static function getVersion()
62+
{
63+
return '2.0.0';
64+
}
65+
66+
/**
67+
* {@inheritdoc}
68+
*/
69+
public function getAliases()
70+
{
71+
return [];
72+
}
73+
}

app/code/Magento/BundleSampleData/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_BundleSampleData" setup_version="2.0.0">
9+
<module name="Magento_BundleSampleData" >
1010
<sequence>
1111
<module name="Magento_Catalog"/>
1212
<module name="Magento_Bundle"/>

app/code/Magento/CatalogRuleSampleData/Setup/InstallData.php

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\CatalogRuleSampleData\Setup\Patch\Data;
8+
9+
use Magento\Framework\Setup;
10+
use Magento\Setup\Model\Patch\DataPatchInterface;
11+
use Magento\Setup\Model\Patch\PatchVersionInterface;
12+
13+
/**
14+
* Class InstallCatalogRuleSampleData
15+
* @package Magento\CatalogRuleSampleData\Setup\Patch\Data
16+
*/
17+
class InstallCatalogRuleSampleData implements DataPatchInterface, PatchVersionInterface
18+
{
19+
/**
20+
* @var Setup\SampleData\Executor
21+
*/
22+
protected $executor;
23+
24+
/**
25+
* @var \Magento\CatalogRuleSampleData\Setup\Installer
26+
*/
27+
protected $installer;
28+
29+
/**
30+
* InstallCatalogRuleSampleData constructor.
31+
* @param Setup\SampleData\Executor $executor
32+
* @param \Magento\CatalogRuleSampleData\Setup\Installer $installer
33+
*/
34+
public function __construct(
35+
Setup\SampleData\Executor $executor,
36+
\Magento\CatalogRuleSampleData\Setup\Installer $installer
37+
) {
38+
$this->executor = $executor;
39+
$this->installer = $installer;
40+
}
41+
42+
/**
43+
* {@inheritdoc}
44+
*/
45+
public function apply()
46+
{
47+
$this->executor->exec($this->installer);
48+
}
49+
50+
/**
51+
* {@inheritdoc}
52+
*/
53+
public static function getDependencies()
54+
{
55+
return [];
56+
}
57+
58+
/**
59+
* {@inheritdoc}
60+
*/
61+
public static function getVersion()
62+
{
63+
return '2.0.0';
64+
}
65+
66+
/**
67+
* {@inheritdoc}
68+
*/
69+
public function getAliases()
70+
{
71+
return [];
72+
}
73+
}

app/code/Magento/CatalogRuleSampleData/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_CatalogRuleSampleData" setup_version="2.0.0">
9+
<module name="Magento_CatalogRuleSampleData" >
1010
<sequence>
1111
<module name="Magento_CatalogRuleConfigurable"/>
1212
<module name="Magento_SampleData"/>

app/code/Magento/CatalogSampleData/Setup/InstallData.php

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\CatalogSampleData\Setup\Patch\Data;
8+
9+
use Magento\Framework\Setup;
10+
use Magento\Setup\Model\Patch\DataPatchInterface;
11+
use Magento\Setup\Model\Patch\PatchVersionInterface;
12+
13+
/**
14+
* Class InstallCatalogSampleData
15+
* @package Magento\CatalogSampleData\Setup\Patch\Data
16+
*/
17+
class InstallCatalogSampleData implements DataPatchInterface, PatchVersionInterface
18+
{
19+
/**
20+
* @var Setup\SampleData\Executor
21+
*/
22+
protected $executor;
23+
24+
/**
25+
* @var \Magento\CatalogSampleData\Setup\Installer
26+
*/
27+
protected $installer;
28+
29+
/**
30+
* InstallCatalogSampleData constructor.
31+
* @param Setup\SampleData\Executor $executor
32+
* @param \Magento\CatalogSampleData\Setup\Installer $installer
33+
*/
34+
public function __construct(
35+
Setup\SampleData\Executor $executor,
36+
\Magento\CatalogSampleData\Setup\Installer $installer
37+
) {
38+
$this->executor = $executor;
39+
$this->installer = $installer;
40+
}
41+
42+
/**
43+
* {@inheritdoc}
44+
*/
45+
public function apply()
46+
{
47+
$this->executor->exec($this->installer);
48+
}
49+
50+
/**
51+
* {@inheritdoc}
52+
*/
53+
public static function getDependencies()
54+
{
55+
return [];
56+
}
57+
58+
/**
59+
* {@inheritdoc}
60+
*/
61+
public static function getVersion()
62+
{
63+
return '2.0.0';
64+
}
65+
66+
/**
67+
* {@inheritdoc}
68+
*/
69+
public function getAliases()
70+
{
71+
return [];
72+
}
73+
}

app/code/Magento/CatalogSampleData/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_CatalogSampleData" setup_version="2.0.0">
9+
<module name="Magento_CatalogSampleData" >
1010
<sequence>
1111
<module name="Magento_Store"/>
1212
<module name="Magento_Eav"/>

app/code/Magento/CmsSampleData/Setup/InstallData.php

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)