Skip to content

Commit

Permalink
Merge branch '2.4-develop' into fix/issue-24735
Browse files Browse the repository at this point in the history
  • Loading branch information
slavvka committed Mar 3, 2020
2 parents 3391686 + 0d3defe commit 88d403c
Show file tree
Hide file tree
Showing 1,560 changed files with 32,990 additions and 7,833 deletions.
23 changes: 0 additions & 23 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,6 @@

DirectoryIndex index.php

<IfModule mod_php5.c>
############################################
## adjust memory limit

php_value memory_limit 756M
php_value max_execution_time 18000

############################################
## disable automatic session start
## before autoload was initialized

php_flag session.auto_start off

############################################
## enable resulting html compression

#php_flag zlib.output_compression on

###########################################
## disable user agent verification to not break multiple image upload

php_flag suhosin.session.cryptua off
</IfModule>
<IfModule mod_php7.c>
############################################
## adjust memory limit
Expand Down
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
[![Open Source Helpers](https://www.codetriage.com/magento/magento2/badges/users.svg)](https://www.codetriage.com/magento/magento2)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/magento/magento2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/magento-2/localized.svg)](https://crowdin.com/project/magento-2)
<p align="center">
<a href="https://magento.com">
<img src="https://static.magento.com/sites/all/themes/magento/logo.svg" width="300px" alt="Magento" />
</a>
</p>
<p align="center">
<br /><br />
<a href="https://www.codetriage.com/magento/magento2">
<img src="https://www.codetriage.com/magento/magento2/badges/users.svg" alt="Open Source Helpers" />
</a>
<a href="https://gitter.im/magento/magento2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge">
<img src="https://badges.gitter.im/Join%20Chat.svg" alt="Gitter" />
</a>
<a href="https://crowdin.com/project/magento-2">
<img src="https://d322cqt584bo4o.cloudfront.net/magento-2/localized.svg" alt="Crowdin" />
</a>
</p>

## Welcome
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting-edge, feature-rich eCommerce solution that gets results.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="LoginAsAdmin">
<actionGroup name="AdminLoginActionGroup">
<conditionalClick selector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" dependentSelector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" visible="true" stepKey="clickDontAllowButtonIfVisible" before="closeAdminNotification"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="LoginAdminWithCredentialsActionGroup">
<actionGroup name="LoginAdminWithCredentialsActionGroup" deprecated="Use AdminLoginActionGroup instead">
<conditionalClick selector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" dependentSelector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" visible="true" stepKey="clickDontAllowButtonIfVisible" before="closeAdminNotification"/>
</actionGroup>
<actionGroup name="LoginAsAdmin" deprecated="Use AdminLoginActionGroup instead">
<conditionalClick selector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" dependentSelector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" visible="true" stepKey="clickDontAllowButtonIfVisible" before="closeAdminNotification"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/>
</before>
<after>
<actionGroup ref="logout" stepKey="logout"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSystemNotificationPage">
<argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/>
Expand Down
69 changes: 50 additions & 19 deletions app/code/Magento/Analytics/ReportXml/QueryFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Analytics\ReportXml;

use Magento\Analytics\ReportXml\DB\SelectBuilderFactory;
use Magento\Framework\App\CacheInterface;
use Magento\Framework\DB\Select;
use Magento\Framework\ObjectManagerInterface;
use Magento\Framework\Serialize\Serializer\Json;

/**
* Creates Query object according to configuration
*
* Factory for @see \Magento\Analytics\ReportXml\Query
*/
class QueryFactory
Expand Down Expand Up @@ -45,6 +49,11 @@ class QueryFactory
*/
private $selectHydrator;

/**
* @var Json
*/
private $jsonSerializer;

/**
* QueryFactory constructor.
*
Expand All @@ -54,21 +63,24 @@ class QueryFactory
* @param SelectBuilderFactory $selectBuilderFactory
* @param Config $config
* @param array $assemblers
* @param Json $jsonSerializer
*/
public function __construct(
CacheInterface $queryCache,
SelectHydrator $selectHydrator,
ObjectManagerInterface $objectManager,
SelectBuilderFactory $selectBuilderFactory,
Config $config,
array $assemblers
array $assemblers,
Json $jsonSerializer
) {
$this->config = $config;
$this->selectBuilderFactory = $selectBuilderFactory;
$this->assemblers = $assemblers;
$this->queryCache = $queryCache;
$this->objectManager = $objectManager;
$this->selectHydrator = $selectHydrator;
$this->jsonSerializer = $jsonSerializer;
}

/**
Expand Down Expand Up @@ -101,14 +113,10 @@ private function constructQuery($queryName)
$selectBuilder = $assembler->assemble($selectBuilder, $queryConfig);
}
$select = $selectBuilder->create();
return $this->objectManager->create(
Query::class,
[
'select' => $select,
'selectHydrator' => $this->selectHydrator,
'connectionName' => $selectBuilder->getConnectionName(),
'config' => $queryConfig
]
return $this->createQueryObject(
$select,
$selectBuilder->getConnectionName(),
$queryConfig
);
}

Expand All @@ -122,19 +130,42 @@ public function create($queryName)
{
$cached = $this->queryCache->load($queryName);
if ($cached) {
$queryData = json_decode($cached, true);
return $this->objectManager->create(
Query::class,
[
'select' => $this->selectHydrator->recreate($queryData['select_parts']),
'selectHydrator' => $this->selectHydrator,
'connectionName' => $queryData['connectionName'],
'config' => $queryData['config']
]
$queryData = $this->jsonSerializer->unserialize($cached);
return $this->createQueryObject(
$this->selectHydrator->recreate($queryData['select_parts']),
$queryData['connectionName'],
$queryData['config']
);
}
$query = $this->constructQuery($queryName);
$this->queryCache->save(json_encode($query), $queryName);
$this->queryCache->save(
$this->jsonSerializer->serialize($query),
$queryName
);
return $query;
}

/**
* Create query class using objectmanger
*
* @param Select $select
* @param string $connection
* @param array $queryConfig
* @return Query
*/
private function createQueryObject(
Select $select,
string $connection,
array $queryConfig
) {
return $this->objectManager->create(
Query::class,
[
'select' => $select,
'selectHydrator' => $this->selectHydrator,
'connectionName' => $connection,
'config' => $queryConfig
]
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<actionGroup ref = "LoginAsAdmin" stepKey="loginAsAdmin"/>
</before>
<after>
<actionGroup ref="logout" stepKey="logout"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>

<!--Navigate through Advanced Reporting button on dashboard to Sign Up page-->
Expand All @@ -35,4 +35,4 @@
<switchToNextTab stepKey="switchToNewTab"/>
<seeInCurrentUrl url="advancedreporting.rjmetrics.com/report" stepKey="seeAssertAdvancedReportingPageUrl"/>
</test>
</tests>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/>
</before>
<after>
<actionGroup ref="logout" stepKey="logout"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateAdvancedReportingPage">
<argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<group value="analytics"/>
</annotations>
<after>
<actionGroup ref="logout" stepKey="logoutOfAdmin"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
</after>
<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustryLabel}}" userInput="Industry" stepKey="seeAdvancedReportingIndustryLabel"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<group value="analytics"/>
</annotations>
<after>
<actionGroup ref="logout" stepKey="logoutOfAdmin"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
</after>
<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingServiceLabel}}" userInput="Advanced Reporting Service" stepKey="seeAdvancedReportingServiceLabelEnabled"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<group value="analytics"/>
</annotations>

<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustryLabel}}" userInput="Industry" stepKey="seeAdvancedReportingIndustryLabel"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
<before>
<createData entity="adminNoReportRole" stepKey="noReportUserRole"/>
<createData entity="adminNoReport" stepKey="noReportUser"/>
<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
<actionGroup ref="logout" stepKey="logoutOfAdmin"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
</after>
<amOnPage url="{{AdminUsersPage.url}}" stepKey="amOnAdminUsersPage"/>
<fillField selector="{{AdminUserGridSection.usernameFilterTextField}}" userInput="$$noReportUser.username$$" stepKey="fillUsernameSearch"/>
Expand All @@ -51,7 +51,7 @@
<scrollTo selector="{{AdminConfigAdvancedReportingSection.advancedReportingMenuItem}}" stepKey="scrollToMenuItem"/>
<!--<see stepKey="seeAdvancedReportingConfigMenuItem" selector="{{AdminConfigAdvancedReportingSection.advancedReportingMenuItem}}" userInput="Advanced Reporting"/>-->
<seeElementInDOM selector="{{AdminConfigAdvancedReportingSection.advancedReportingMenuItem}}" stepKey="seeAdvancedReportingConfigMenuItem"/>
<actionGroup ref="logout" stepKey="logoutOfAdmin2"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin2"/>

<amOnPage url="{{AdminLoginPage.url}}" stepKey="amOnAdminLoginPage"/>
<fillField selector="{{AdminLoginFormSection.username}}" userInput="$$noReportUser.username$$" stepKey="fillUsernameNoReport"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<group value="analytics"/>
</annotations>
<after>
<actionGroup ref="logout" stepKey="logoutOfAdmin"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
</after>
<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustry}}" userInput="Apps and Games" stepKey="selectAdvancedReportingIndustry"/>
Expand Down
Loading

0 comments on commit 88d403c

Please sign in to comment.