-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2.4-develop' of http://github.com/magento/magento2 into…
… fix_issue_16315
- Loading branch information
Showing
1,678 changed files
with
49,405 additions
and
28,253 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
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
13 changes: 13 additions & 0 deletions
13
.../AdminAnalytics/Test/Mftf/ActionGroup/_Deprecated_ActionGroup/LoginAsAdminActionGroup.xml
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,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="LoginAsAdmin" deprecated="Use AdminLoginActionGroup instead"> | ||
<conditionalClick selector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" dependentSelector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" visible="true" stepKey="clickDontAllowButtonIfVisible" before="closeAdminNotification"/> | ||
</actionGroup> | ||
</actionGroups> |
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
95 changes: 95 additions & 0 deletions
95
app/code/Magento/Analytics/Setup/Patch/Data/ActivateDataCollection.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,95 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Magento\Analytics\Setup\Patch\Data; | ||
|
||
use Magento\Analytics\Model\Config\Backend\CollectionTime; | ||
use Magento\Analytics\Model\SubscriptionStatusProvider; | ||
use Magento\Framework\App\Config\ScopeConfigInterface; | ||
use Magento\Framework\Exception\LocalizedException; | ||
use Magento\Framework\Setup\Patch\DataPatchInterface; | ||
|
||
/** | ||
* Activate data collection mechanism | ||
*/ | ||
class ActivateDataCollection implements DataPatchInterface | ||
{ | ||
/** | ||
* @var ScopeConfigInterface | ||
*/ | ||
private $scopeConfig; | ||
|
||
/** | ||
* @var SubscriptionStatusProvider | ||
*/ | ||
private $subscriptionStatusProvider; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $analyticsCollectionTimeConfigPath = 'analytics/general/collection_time'; | ||
|
||
/** | ||
* @var CollectionTime | ||
*/ | ||
private $collectionTimeBackendModel; | ||
|
||
/** | ||
* @param ScopeConfigInterface $scopeConfig | ||
* @param SubscriptionStatusProvider $subscriptionStatusProvider | ||
* @param CollectionTime $collectionTimeBackendModel | ||
*/ | ||
public function __construct( | ||
ScopeConfigInterface $scopeConfig, | ||
SubscriptionStatusProvider $subscriptionStatusProvider, | ||
CollectionTime $collectionTimeBackendModel | ||
) { | ||
$this->scopeConfig = $scopeConfig; | ||
$this->subscriptionStatusProvider = $subscriptionStatusProvider; | ||
$this->collectionTimeBackendModel = $collectionTimeBackendModel; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
* | ||
* @throws LocalizedException | ||
*/ | ||
public function apply() | ||
{ | ||
$subscriptionStatus = $this->subscriptionStatusProvider->getStatus(); | ||
$isCollectionProcessActivated = $this->scopeConfig->getValue(CollectionTime::CRON_SCHEDULE_PATH); | ||
if ($subscriptionStatus !== $this->subscriptionStatusProvider->getStatusForDisabledSubscription() | ||
&& !$isCollectionProcessActivated | ||
) { | ||
$this->collectionTimeBackendModel | ||
->setValue($this->scopeConfig->getValue($this->analyticsCollectionTimeConfigPath)); | ||
$this->collectionTimeBackendModel->setPath($this->analyticsCollectionTimeConfigPath); | ||
$this->collectionTimeBackendModel->afterSave(); | ||
} | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getAliases() | ||
{ | ||
return []; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public static function getDependencies() | ||
{ | ||
return [ | ||
PrepareInitialConfig::class, | ||
]; | ||
} | ||
} |
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.