Skip to content

Commit f04d3ef

Browse files
authored
Merge pull request #3884 from magento-arcticfoxes/2.3.1-qwerty-pr
[2.3.1-qwerty] Sync with 2.3.1-release
2 parents b838e74 + b88c067 commit f04d3ef

File tree

11 files changed

+133
-9
lines changed

11 files changed

+133
-9
lines changed

app/code/Magento/Braintree/Controller/Paypal/Review.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
use Magento\Braintree\Model\Paypal\Helper\QuoteUpdater;
1414
use Magento\Framework\Exception\LocalizedException;
1515
use Magento\Framework\App\Action\HttpPostActionInterface;
16+
use Magento\Framework\App\Action\HttpGetActionInterface;
1617

1718
/**
1819
* Class Review
1920
*/
20-
class Review extends AbstractAction implements HttpPostActionInterface
21+
class Review extends AbstractAction implements HttpPostActionInterface, HttpGetActionInterface
2122
{
2223
/**
2324
* @var QuoteUpdater

app/code/Magento/CatalogAnalytics/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"require": {
55
"php": "~7.1.3||~7.2.0",
66
"magento/framework": "*",
7-
"magento/module-catalog": "*"
7+
"magento/module-catalog": "*",
8+
"magento/module-analytics": "*"
89
},
910
"type": "magento2-module",
1011
"license": [

app/code/Magento/CustomerAnalytics/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"require": {
55
"php": "~7.1.3||~7.2.0",
66
"magento/framework": "*",
7-
"magento/module-customer": "*"
7+
"magento/module-customer": "*",
8+
"magento/module-analytics": "*"
89
},
910
"type": "magento2-module",
1011
"license": [

app/code/Magento/GiftMessage/Model/CompositeConfigProvider.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
use Magento\Checkout\Model\ConfigProviderInterface;
99

10+
/**
11+
* Class CompositeConfigProvider
12+
*/
1013
class CompositeConfigProvider implements ConfigProviderInterface
1114
{
1215
/**
@@ -18,13 +21,13 @@ class CompositeConfigProvider implements ConfigProviderInterface
1821
* @param ConfigProviderInterface[] $configProviders
1922
*/
2023
public function __construct(
21-
array $configProviders
24+
array $configProviders = []
2225
) {
2326
$this->configProviders = $configProviders;
2427
}
2528

2629
/**
27-
* {@inheritdoc}
30+
* @inheritdoc
2831
*/
2932
public function getConfig()
3033
{

app/code/Magento/QuoteAnalytics/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"require": {
55
"php": "~7.1.3||~7.2.0",
66
"magento/framework": "*",
7-
"magento/module-quote": "*"
7+
"magento/module-quote": "*",
8+
"magento/module-analytics": "*"
89
},
910
"type": "magento2-module",
1011
"license": [

app/code/Magento/ReviewAnalytics/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"require": {
55
"php": "~7.1.3||~7.2.0",
66
"magento/framework": "*",
7-
"magento/module-review": "*"
7+
"magento/module-review": "*",
8+
"magento/module-analytics": "*"
89
},
910
"type": "magento2-module",
1011
"license": [

app/code/Magento/SalesAnalytics/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"require": {
55
"php": "~7.1.3||~7.2.0",
66
"magento/framework": "*",
7-
"magento/module-sales": "*"
7+
"magento/module-sales": "*",
8+
"magento/module-analytics": "*"
89
},
910
"type": "magento2-module",
1011
"license": [

app/code/Magento/WishlistAnalytics/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"require": {
55
"php": "~7.1.3||~7.2.0",
66
"magento/framework": "*",
7-
"magento/module-wishlist": "*"
7+
"magento/module-wishlist": "*",
8+
"magento/module-analytics": "*"
89
},
910
"type": "magento2-module",
1011
"license": [
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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\Braintree\Controller\Paypal;
9+
10+
use Magento\Framework\App\Action\HttpGetActionInterface;
11+
use Magento\Framework\App\Action\HttpPostActionInterface;
12+
use Magento\TestFramework\TestCase\AbstractController;
13+
14+
/**
15+
* ReviewTest
16+
*/
17+
class ReviewTest extends AbstractController
18+
{
19+
/**
20+
* @var Review
21+
*/
22+
private $controller;
23+
24+
/**
25+
* @inheritdoc
26+
*/
27+
protected function setUp()
28+
{
29+
parent::setUp();
30+
31+
$this->controller = $this->_objectManager->create(Review::class);
32+
}
33+
34+
/**
35+
* Test controller implements correct interfaces
36+
*
37+
*/
38+
public function testInterfaceImplementation()
39+
{
40+
$this->assertInstanceOf(HttpGetActionInterface::class, $this->controller);
41+
$this->assertInstanceOf(HttpPostActionInterface::class, $this->controller);
42+
}
43+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
declare(strict_types=1);
8+
9+
namespace Magento\TestFramework\Dependency;
10+
11+
/**
12+
* Class provides dependency rule for analytics.xml config file.
13+
*/
14+
class AnalyticsConfigRule implements RuleInterface
15+
{
16+
/**
17+
* @inheritdoc
18+
*/
19+
public function getDependencyInfo($currentModule, $fileType, $file, &$contents)
20+
{
21+
if ('config' != $fileType || !preg_match('#.*/analytics\.xml$#', $file)) {
22+
return [];
23+
}
24+
25+
$dependenciesInfo = [];
26+
if (preg_match_all('#<[customProvider|reportProvider][^>]*class=[\'"]([^\'"]+)[\'"]#i', $contents, $matches)) {
27+
$classes = array_pop($matches);
28+
foreach ($classes as $class) {
29+
$classParts = explode('\\', $class);
30+
$module = implode('\\', array_slice($classParts, 0, 2));
31+
if (strtolower($currentModule) !== strtolower($module)) {
32+
$dependenciesInfo[] = [
33+
'module' => $module,
34+
'type' => RuleInterface::TYPE_HARD,
35+
'source' => $file,
36+
];
37+
}
38+
}
39+
}
40+
41+
return $dependenciesInfo;
42+
}
43+
}

0 commit comments

Comments
 (0)