Skip to content

Commit c515eaf

Browse files
committed
MC-20322: [Forwardport] Disable statistic collecting for Reports module
1 parent b9d9c5e commit c515eaf

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Reports\Setup\Patch\Data;
9+
10+
use Magento\Framework\Notification\NotifierInterface;
11+
12+
class ReportDisableNotification implements \Magento\Framework\Setup\Patch\DataPatchInterface
13+
{
14+
/**
15+
* @var NotifierInterface
16+
*/
17+
private $notifier;
18+
19+
/**
20+
* @param NotifierInterface $notifier
21+
*/
22+
public function __construct(
23+
NotifierInterface $notifier
24+
) {
25+
$this->notifier = $notifier;
26+
}
27+
28+
/**
29+
* @inheritdoc
30+
*/
31+
public function apply()
32+
{
33+
$message = <<<"MESSAGE"
34+
Statistics collection for Magento Reports is now disabled by default in the interest of improving performance.
35+
Please turn Magento Reports back in System Config.
36+
MESSAGE;
37+
$this->notifier->addNotice(__('Disable Notice'), __($message));
38+
}
39+
40+
/**
41+
* @inheritdoc
42+
*/
43+
public function getAliases()
44+
{
45+
return [];
46+
}
47+
48+
/**
49+
* @inheritdoc
50+
*/
51+
public static function getDependencies()
52+
{
53+
return [];
54+
}
55+
}

0 commit comments

Comments
 (0)