Skip to content

Commit f256c35

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-56052' into troll_bugfix
2 parents 0d4b043 + ce765dc commit f256c35

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Indexer\Setup;
8+
9+
use Magento\Framework\Setup\InstallDataInterface;
10+
use Magento\Framework\Setup\ModuleContextInterface;
11+
use Magento\Framework\Setup\ModuleDataSetupInterface;
12+
use Magento\Indexer\Model\IndexerFactory;
13+
use Magento\Framework\Indexer\ConfigInterface;
14+
15+
/**
16+
* Recurring data upgrade for indexer module
17+
*/
18+
class RecurringData implements InstallDataInterface
19+
{
20+
/**
21+
* @var IndexerFactory
22+
*/
23+
private $indexerFactory;
24+
25+
/**
26+
* @var ConfigInterface
27+
*/
28+
private $configInterface;
29+
30+
/**
31+
* RecurringData constructor.
32+
*
33+
* @param IndexerFactory $indexerFactory
34+
* @param ConfigInterface $configInterface
35+
*/
36+
public function __construct(
37+
IndexerFactory $indexerFactory,
38+
ConfigInterface $configInterface
39+
) {
40+
$this->indexerFactory = $indexerFactory;
41+
$this->configInterface = $configInterface;
42+
}
43+
44+
/**
45+
* {@inheritdoc}
46+
*/
47+
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
48+
{
49+
foreach (array_keys($this->configInterface->getIndexers()) as $indexerId) {
50+
$indexer = $this->indexerFactory->create()->load($indexerId);
51+
if ($indexer->isScheduled()) {
52+
$indexer->getView()->unsubscribe()->subscribe();
53+
}
54+
}
55+
}
56+
}

lib/internal/Magento/Framework/Mview/etc/mview.xsd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
<xs:simpleType name="subscriptionModelType">
107107
<xs:annotation>
108108
<xs:documentation>
109-
Subscription model must be a valid PHP class or interface name.
109+
DEPRECATED. Subscription model must be a valid PHP class or interface name.
110110
</xs:documentation>
111111
</xs:annotation>
112112
<xs:restriction base="xs:string">

0 commit comments

Comments
 (0)