Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'upstream/2.3-develop' into feature/brai…
Browse files Browse the repository at this point in the history
…ntree-payment
  • Loading branch information
pmclain committed Jul 30, 2019
2 parents c552e35 + fc7fb0d commit e49df5b
Show file tree
Hide file tree
Showing 540 changed files with 9,327 additions and 2,047 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/AdminNotification/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"sort-packages": true
},
"require": {
"php": "~7.1.3||~7.2.0",
"php": "~7.1.3||~7.2.0||~7.3.0",
"lib-libxml": "*",
"magento/framework": "*",
"magento/module-backend": "*",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/AdvancedPricingImportExport/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"sort-packages": true
},
"require": {
"php": "~7.1.3||~7.2.0",
"php": "~7.1.3||~7.2.0||~7.3.0",
"magento/framework": "*",
"magento/module-catalog": "*",
"magento/module-catalog-import-export": "*",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/AdvancedSearch/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"magento/module-customer": "*",
"magento/module-search": "*",
"magento/module-store": "*",
"php": "~7.1.3||~7.2.0"
"php": "~7.1.3||~7.2.0||~7.3.0"
},
"type": "magento2-module",
"license": [
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Amqp/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"magento/framework": "*",
"magento/framework-amqp": "*",
"magento/framework-message-queue": "*",
"php": "~7.1.3||~7.2.0"
"php": "~7.1.3||~7.2.0||~7.3.0"
},
"type": "magento2-module",
"license": [
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/AmqpStore/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"magento/framework": "*",
"magento/framework-amqp": "*",
"magento/module-store": "*",
"php": "~7.1.3||~7.2.0"
"php": "~7.1.3||~7.2.0||~7.3.0"
},
"suggest": {
"magento/module-asynchronous-operations": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ public function __construct(ConverterInterface $converter, array $responseHandle
}

/**
* @param \Zend_Http_Response $response
* Get result from $response.
*
* @param \Zend_Http_Response $response
* @return bool|string
*/
public function getResult(\Zend_Http_Response $response)
Expand All @@ -41,7 +42,8 @@ public function getResult(\Zend_Http_Response $response)
$converterMediaType = $this->converter->getContentMediaType();

/** Content-Type header may not only contain media-type declaration */
if ($response->getBody() && is_int(strripos($response->getHeader('Content-Type'), $converterMediaType))) {
if ($response->getBody()
&& is_int(strripos($response->getHeader('Content-Type'), (string) $converterMediaType))) {
$responseBody = $this->converter->fromBody($response->getBody());
} else {
$responseBody = [];
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Analytics/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-analytics",
"description": "N/A",
"require": {
"php": "~7.1.3||~7.2.0",
"php": "~7.1.3||~7.2.0||~7.3.0",
"magento/module-backend": "*",
"magento/module-config": "*",
"magento/module-integration": "*",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/AsynchronousOperations/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"magento/module-authorization": "*",
"magento/module-backend": "*",
"magento/module-ui": "*",
"php": "~7.1.3||~7.2.0"
"php": "~7.1.3||~7.2.0||~7.3.0"
},
"suggest": {
"magento/module-admin-notification": "*",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Authorization/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"sort-packages": true
},
"require": {
"php": "~7.1.3||~7.2.0",
"php": "~7.1.3||~7.2.0||~7.3.0",
"magento/framework": "*",
"magento/module-backend": "*"
},
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Authorizenet/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"sort-packages": true
},
"require": {
"php": "~7.1.3||~7.2.0",
"php": "~7.1.3||~7.2.0||~7.3.0",
"magento/framework": "*",
"magento/module-backend": "*",
"magento/module-catalog": "*",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/AuthorizenetAcceptjs/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"sort-packages": true
},
"require": {
"php": "~7.1.3||~7.2.0",
"php": "~7.1.3||~7.2.0||~7.3.0",
"magento/framework": "*",
"magento/module-payment": "*",
"magento/module-sales": "*",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/AuthorizenetCardinal/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"sort-packages": true
},
"require": {
"php": "~7.1.3||~7.2.0",
"php": "~7.1.3||~7.2.0||~7.3.0",
"magento/module-authorizenet-acceptjs": "*",
"magento/framework": "*",
"magento/module-cardinal-commerce": "*",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/AuthorizenetGraphQl/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "N/A",
"type": "magento2-module",
"require": {
"php": "~7.1.3||~7.2.0",
"php": "~7.1.3||~7.2.0||~7.3.0",
"magento/framework": "*",
"magento/module-quote-graph-ql": "*"
},
Expand Down
35 changes: 29 additions & 6 deletions app/code/Magento/Backend/App/Area/FrontNameResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@
use Magento\Backend\Setup\ConfigOptionsList;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\App\DeploymentConfig;
use Magento\Framework\App\ObjectManager;
use Magento\Framework\App\RequestInterface;
use Magento\Store\Model\ScopeInterface;
use Magento\Store\Model\Store;
use Zend\Uri\Uri;

/**
* Class to get area front name.
*
* @api
* @since 100.0.2
*/
Expand Down Expand Up @@ -59,19 +64,35 @@ class FrontNameResolver implements \Magento\Framework\App\Area\FrontNameResolver
*/
private $scopeConfig;

/**
* @var Uri
*/
private $uri;

/**
* @var RequestInterface
*/
private $request;

/**
* @param \Magento\Backend\App\Config $config
* @param DeploymentConfig $deploymentConfig
* @param ScopeConfigInterface $scopeConfig
* @param Uri $uri
* @param RequestInterface $request
*/
public function __construct(
\Magento\Backend\App\Config $config,
DeploymentConfig $deploymentConfig,
ScopeConfigInterface $scopeConfig
ScopeConfigInterface $scopeConfig,
Uri $uri = null,
RequestInterface $request = null
) {
$this->config = $config;
$this->defaultFrontName = $deploymentConfig->get(ConfigOptionsList::CONFIG_PATH_BACKEND_FRONTNAME);
$this->scopeConfig = $scopeConfig;
$this->uri = $uri ?: ObjectManager::getInstance()->get(Uri::class);
$this->request = $request ?: ObjectManager::getInstance()->get(RequestInterface::class);
}

/**
Expand Down Expand Up @@ -104,8 +125,8 @@ public function isHostBackend()
} else {
$backendUrl = $this->scopeConfig->getValue(Store::XML_PATH_UNSECURE_BASE_URL, ScopeInterface::SCOPE_STORE);
}
$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';
return stripos($this->getHostWithPort($backendUrl), $host) !== false;
$host = $this->request->getServer('HTTP_HOST', '');
return stripos($this->getHostWithPort($backendUrl), (string) $host) !== false;
}

/**
Expand All @@ -116,9 +137,11 @@ public function isHostBackend()
*/
private function getHostWithPort($url)
{
$scheme = parse_url(trim($url), PHP_URL_SCHEME);
$host = parse_url(trim($url), PHP_URL_HOST);
$port = parse_url(trim($url), PHP_URL_PORT);
$this->uri->parse($url);
$scheme = $this->uri->getScheme();
$host = $this->uri->getHost();
$port = $this->uri->getPort();

if (!$port) {
$port = isset($this->standardPorts[$scheme]) ? $this->standardPorts[$scheme] : null;
}
Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Backend/Block/Page/RequireJs.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public function __construct(
\Magento\Framework\Data\Form\FormKey $formKey,
array $data = []
) {
$this->formKey = $formKey;
parent::__construct(
$context,
$data
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?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="AdminClickFormActionButtonActionGroup">
<arguments>
<argument name="buttonSelector" type="string" />
</arguments>
<waitForElementVisible selector="{{buttonSelector}}" stepKey="waitForButton"/>
<click selector="{{buttonSelector}}" stepKey="clickButton"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?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="AdminFilterLegacyGridActionGroup">
<arguments>
<argument name="fieldSelector" type="string"/>
<argument name="value" type="string"/>
<argument name="button" type="string" defaultValue="{{AdminLegacyDataGridFilterSection.apply}}"/>
</arguments>
<click selector="{{AdminLegacyDataGridFilterSection.clear}}" stepKey="resetFilters" />
<waitForPageLoad stepKey="waitForFilterReset" />
<fillField selector="{{field}}" userInput="{{value}}" stepKey="fillFieldInFilter"/>
<click selector="{{button}}" stepKey="clickSearchButton"/>
<waitForPageLoad stepKey="waitForFiltersApply" />
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?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="AdminResetLegacyGridFilterActionGroup">
<arguments>
<argument name="selector" type="string" defaultValue="{{AdminLegacyDataGridFilterSection.clear}}"/>
</arguments>
<click selector="{{selector}}" stepKey="clickResetButton"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminLegacyDataGridFilterSection">
<element name="filterForm" type="block" selector="[data-role='filter-form']" />
<element name="inputFieldByNameAttr" type="input" selector="[data-role='filter-form'] input[name='{{inputNameAttr}}']" parameterized="true" />
<element name="apply" type="button" selector=".admin__data-grid-header [data-action='grid-filter-apply']" />
<element name="clear" type="button" selector=".admin__data-grid-header [data-action='grid-filter-reset']" />
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminLegacyDataGridTableSection">
<element name="rowTemplateStrict" type="block" selector="//tbody/tr[td[text()[normalize-space()='{{text}}']]]" parameterized="true" />
<element name="rowTemplate" type="block" selector="//tbody/tr[td[contains(.,normalize-space('{{text}}'))]]" parameterized="true" />
<element name="columnTemplateStrict" type="block" selector="//tbody/tr[td[contains(.,normalize-space('{{text}}'))]]/td[@data-column='{{dataColumn}}']" parameterized="true" />
<element name="columnTemplate" type="block" selector="//tbody/tr[td[contains(.,normalize-space('{{text}}'))]]/td[@data-column='{{dataColumn}}']" parameterized="true" />
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@
<element name="saveAndContinue" type="button" selector="button[id*=save_and_continue]" timeout="30"/>
<element name="delete" type="button" selector="#delete" timeout="30"/>
<element name="add" type="button" selector="#add" timeout="30"/>
<element name="cancelDelete" type="button" selector=".modal-popup.confirm button.action-dismiss" timeout="10"/>
<element name="confirmDelete" type="button" selector=".modal-popup.confirm button.action-accept" timeout="10"/>
</section>
</sections>
Loading

0 comments on commit e49df5b

Please sign in to comment.