Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.3-develop' into recheck-129-re…
Browse files Browse the repository at this point in the history
…trive-customer-token
  • Loading branch information
TomashKhamlai committed Sep 14, 2018
2 parents 85cd239 + b647e9e commit 6a250c1
Show file tree
Hide file tree
Showing 1,689 changed files with 53,715 additions and 21,798 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Technical issue with the Magento 2 core components

---

<!---
Please review our guidelines before adding a new issue: https://github.com/magento/magento2/wiki/Issue-reporting-guidelines
-->

### Preconditions
<!---
Provide the exact Magento version (example: 2.2.5) and any important information on the environment where bug is reproducible.
-->
1.
2.

### Steps to reproduce
<!---
Important: Provide a set of clear steps to reproduce this bug. We can not provide support without clear instructions on how to reproduce.
-->
1.
2.

### Expected result
<!--- Tell us what do you expect to happen. -->
1. [Screenshots, logs or description]
2.

### Actual result
<!--- Tell us what happened instead. Include error messages and issues. -->
1. [Screenshots, logs or description]
2.
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/developer-experience-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Developer experience issue
about: Issues related to customization, extensibility, modularity

---

<!---
Please review our guidelines before adding a new issue: https://github.com/magento/magento2/wiki/Issue-reporting-guidelines
-->

### Summary
<!--- Describe the issue you are experiencing. Include general information, error messages, environments, and so on. -->

### Examples
<!--- Provide code examples or a patch with a test (recommended) to clearly indicate the problem. -->

### Proposed solution
<!--- Suggest your potential solutions for this issue. -->
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Feature request
about: Please consider reporting directly to https://github.com/magento/community-features

---

<!---
Important: This repository is intended only for Magento 2 Technical Issues. Enter Feature Requests at https://github.com/magento/community-features. Project stakeholders monitor and manage requests. Feature requests entered using this form may be moved to the forum.
-->

### Description
<!--- Describe the feature you would like to add. -->

### Expected behavior
<!--- What is the expected behavior of this feature? How is it going to work? -->

### Benefits
<!--- How do you think this feature would improve Magento? -->

### Additional information
<!--- What other information can you provide about the desired feature? -->
2 changes: 0 additions & 2 deletions app/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
// Sets default autoload mappings, may be overridden in Bootstrap::create
\Magento\Framework\App\Bootstrap::populateAutoloader(BP, []);

require_once BP . '/app/functions.php';

/* Custom umask value may be provided in optional mage_umask file in root */
$umaskFile = BP . '/magento_umask';
$mask = file_exists($umaskFile) ? octdec(file_get_contents($umaskFile)) : 002;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ public function execute()
);
return $resultLayout;
} catch (\Exception $e) {
$this->messageManager->addError($e->getMessage());
$this->messageManager->addErrorMessage($e->getMessage());
}
} else {
$this->messageManager->addError(__('Please correct the data sent.'));
$this->messageManager->addErrorMessage(__('Please correct the data sent.'));
}
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
$resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
Expand Down
30 changes: 22 additions & 8 deletions app/code/Magento/AdvancedSearch/Model/ResourceModel/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Magento\Catalog\Model\Indexer\Category\Product\AbstractAction;
use Magento\Framework\Search\Request\IndexScopeResolverInterface as TableResolver;
use Magento\Catalog\Model\Indexer\Product\Price\DimensionCollectionFactory;
use Magento\Store\Model\Indexer\WebsiteDimensionProvider;

/**
* @api
Expand Down Expand Up @@ -47,12 +48,17 @@ class Index extends AbstractDb
*/
private $dimensionCollectionFactory;

/**
* @var int|null
*/
private $websiteId;

/**
* Index constructor.
* @param Context $context
* @param StoreManagerInterface $storeManager
* @param MetadataPool $metadataPool
* @param null $connectionName
* @param string|null $connectionName
* @param TableResolver|null $tableResolver
* @param DimensionCollectionFactory|null $dimensionCollectionFactory
*/
Expand Down Expand Up @@ -94,12 +100,17 @@ protected function _getCatalogProductPriceData($productIds = null)
$catalogProductIndexPriceSelect = [];

foreach ($this->dimensionCollectionFactory->create() as $dimensions) {
$catalogProductIndexPriceSelect[] = $connection->select()->from(
$this->tableResolver->resolve('catalog_product_index_price', $dimensions),
['entity_id', 'customer_group_id', 'website_id', 'min_price']
);
if ($productIds) {
current($catalogProductIndexPriceSelect)->where('entity_id IN (?)', $productIds);
if (!isset($dimensions[WebsiteDimensionProvider::DIMENSION_NAME]) ||
$this->websiteId === null ||
$dimensions[WebsiteDimensionProvider::DIMENSION_NAME]->getValue() === $this->websiteId) {
$select = $connection->select()->from(
$this->tableResolver->resolve('catalog_product_index_price', $dimensions),
['entity_id', 'customer_group_id', 'website_id', 'min_price']
);
if ($productIds) {
$select->where('entity_id IN (?)', $productIds);
}
$catalogProductIndexPriceSelect[] = $select;
}
}

Expand All @@ -123,9 +134,12 @@ protected function _getCatalogProductPriceData($productIds = null)
*/
public function getPriceIndexData($productIds, $storeId)
{
$websiteId = $this->storeManager->getStore($storeId)->getWebsiteId();

$this->websiteId = $websiteId;
$priceProductsIndexData = $this->_getCatalogProductPriceData($productIds);
$this->websiteId = null;

$websiteId = $this->storeManager->getStore($storeId)->getWebsiteId();
if (!isset($priceProductsIndexData[$websiteId])) {
return [];
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Analytics/ReportXml/ReportProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function __construct(
private function getIteratorName(Query $query)
{
$config = $query->getConfig();
return isset($config['iterator']) ? $config['iterator'] : null;
return $config['iterator'] ?? null;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Analytics/Test/Mftf/Data/UserData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->

<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
<entity name="adminNoReport" type="user">
<data key="username" unique="suffix">noreport</data>
<data key="firstname">No</data>
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Analytics/Test/Mftf/Data/UserRoleData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->

<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
<entity name="adminNoReportRole" type="user_role">
<data key="rolename" unique="suffix">noreport</data>
<data key="current_password">123123q</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
-->
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataOperation.xsd">
<operation name="CreateUser" dataType="user" type="create"
auth="adminFormKey" url="/admin/user/save/" method="POST" successRegex="/messages-message-success/" returnRegex="" >
<contentType>application/x-www-form-urlencoded</contentType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
-->
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataOperation.xsd">
<operation name="CreateUserRole" dataType="user_role" type="create"
auth="adminFormKey" url="/admin/user_role/saverole/" method="POST" successRegex="/messages-message-success/" returnRegex="" >
<contentType>application/x-www-form-urlencoded</contentType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
-->
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminConfigurationBlankIndustryTest">
<annotations>
<features value="Analytics"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminConfigurationEnableDisableAnalyticsTest">
<annotations>
<features value="Analytics"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminConfigurationIndustryTest">
<annotations>
<features value="Analytics"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminConfigurationPermissionTest">
<annotations>
<features value="Analytics"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminConfigurationTimeToSendDataTest">
<annotations>
<features value="Analytics"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@
use Magento\Authorizenet\Model\Directpost;
use Magento\Authorizenet\Model\DirectpostFactory;
use Magento\Framework\App\Action\Context;
use Magento\Framework\App\CsrfAwareActionInterface;
use Magento\Framework\App\Request\InvalidRequestException;
use Magento\Framework\App\RequestInterface;
use Magento\Framework\Controller\ResultFactory;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Registry;
use Psr\Log\LoggerInterface;

class BackendResponse extends \Magento\Authorizenet\Controller\Directpost\Payment
class BackendResponse extends \Magento\Authorizenet\Controller\Directpost\Payment implements CsrfAwareActionInterface
{
/**
* @var LoggerInterface
Expand Down Expand Up @@ -48,6 +51,23 @@ public function __construct(
$this->logger = $logger ?: $this->_objectManager->get(LoggerInterface::class);
}

/**
* @inheritDoc
*/
public function createCsrfValidationException(
RequestInterface $request
): ?InvalidRequestException {
return null;
}

/**
* @inheritDoc
*/
public function validateForCsrf(RequestInterface $request): ?bool
{
return true;
}

/**
* Response action.
* Action for Authorize.net SIM Relay Request.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,29 @@
*/
namespace Magento\Authorizenet\Controller\Directpost\Payment;

class Response extends \Magento\Authorizenet\Controller\Directpost\Payment
use Magento\Framework\App\CsrfAwareActionInterface;
use Magento\Framework\App\Request\InvalidRequestException;
use Magento\Framework\App\RequestInterface;

class Response extends \Magento\Authorizenet\Controller\Directpost\Payment implements CsrfAwareActionInterface
{
/**
* @inheritDoc
*/
public function createCsrfValidationException(
RequestInterface $request
): ?InvalidRequestException {
return null;
}

/**
* @inheritDoc
*/
public function validateForCsrf(RequestInterface $request): ?bool
{
return true;
}

/**
* Response action.
* Action for Authorize.net SIM Relay Request.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
var config = {
map: {
'*': {
transparent: 'Magento_Payment/transparent'
transparent: 'Magento_Payment/js/transparent'
}
}
};
4 changes: 2 additions & 2 deletions app/code/Magento/Backend/App/Action/Plugin/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ protected function _processNotLoggedInUser(\Magento\Framework\App\RequestInterfa
} else {
$this->_actionFlag->set('', \Magento\Framework\App\ActionInterface::FLAG_NO_DISPATCH, true);
$this->_response->setRedirect($this->_url->getCurrentUrl());
$this->messageManager->addError(__('Invalid Form Key. Please refresh the page.'));
$this->messageManager->addErrorMessage(__('Invalid Form Key. Please refresh the page.'));
$isRedirectNeeded = true;
}
}
Expand Down Expand Up @@ -205,7 +205,7 @@ protected function _performLogin(\Magento\Framework\App\RequestInterface $reques
$this->_auth->login($username, $password);
} catch (AuthenticationException $e) {
if (!$request->getParam('messageSent')) {
$this->messageManager->addError($e->getMessage());
$this->messageManager->addErrorMessage($e->getMessage());
$request->setParam('messageSent', true);
$outputValue = false;
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/App/DefaultPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ public function __construct(\Magento\Backend\App\ConfigInterface $config)
*/
public function getPart($code)
{
return isset($this->_parts[$code]) ? $this->_parts[$code] : null;
return $this->_parts[$code] ?? null;
}
}
Loading

0 comments on commit 6a250c1

Please sign in to comment.