Skip to content

Commit 63f7b35

Browse files
authored
MCLOUD-5666: Assign every patch to modules it changes (#34)
1 parent 11eb2d9 commit 63f7b35

6 files changed

+103
-102
lines changed

patches.json

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@
7878
"2.2.0 - 2.2.3": "SET-36__fix_oom_during_customer_import__2.2.0.patch",
7979
"2.2.4": "SET-36__fix_oom_during_customer_import__2.2.4.patch"
8080
},
81-
"Add PayPal and Braintree TPV codes on checkout": {
82-
"~2.1.8": "MAGETWO-53941__fix_enterprise_payment_codes__2.1.8.patch"
83-
},
8481
"Fix Mview on staging environments": {
8582
"2.1.4": "MAGETWO-84444__fix_mview_on_staging__2.1.4.patch",
8683
"2.1.5 - 2.1.9": "MAGETWO-84444__fix_mview_on_staging__2.1.5.patch",
@@ -218,9 +215,6 @@
218215
"2.2.0 - 2.2.8": "PRODSECBUG-2432__admin_path_disclosure_bug__2.2.0.patch",
219216
"2.3.0 - 2.3.1": "PRODSECBUG-2432__admin_path_disclosure_bug__2.3.0.patch"
220217
},
221-
"Transaction MD5 hash field is removed by Authorize.net": {
222-
"2.2.0 - 2.2.7": "MAGETWO-98129__transaction_field_is_removed_by_authorize_net__2.2.0.patch"
223-
},
224218
"Customer attributes issue": {
225219
"2.2.6": "MAGETWO-95591__customer_attributes_issue__2.2.6.patch"
226220
},
@@ -233,13 +227,28 @@
233227
"Fix for multi-site configuration issue": {
234228
"2.2.4": "MAGETWO-92926__fix_for_multi-site_configuration_issue__2.2.4.patch"
235229
},
236-
"Fix PayPal issue with region": {
237-
"2.3.4": "MC-31387__fix_paypal_issue_with_region__2.3.4.patch"
238-
},
239230
"FPC is getting disabled during deployments": {
240231
">=2.3.2 <2.4.0": "MAGECLOUD-5069__fpc_is_getting_disabled_during_deployments__2.3.2.patch"
241232
}
242233
},
234+
"magento/module-paypal": {
235+
"Add PayPal TPV codes on checkout": {
236+
"~100.1.6": "MAGETWO-53941__fix_enterprise_paypal_codes__100.1.6.patch"
237+
},
238+
"Fix PayPal issue with region": {
239+
"100.3.4": "MC-31387__fix_paypal_issue_with_region__100.3.4.patch"
240+
}
241+
},
242+
"magento/module-authorizenet": {
243+
"Transaction MD5 hash field is removed by Authorize.net": {
244+
"100.2.0 - 100.2.3": "MAGETWO-98129__transaction_field_is_removed_by_authorize_net__100.2.0.patch"
245+
}
246+
},
247+
"magento/module-braintree": {
248+
"Add Braintree TPV codes on checkout": {
249+
"~100.1.6": "MAGETWO-53941__fix_enterprise_braintree_code__100.1.6.patch"
250+
}
251+
},
243252
"monolog/monolog": {
244253
"Fix monolog Slack Handler bug for magento 2.1.x": {
245254
"1.16.0": "MAGECLOUD-2793__fix_monolog_slack_handler_2.1.x.patch"
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
diff -Nuar a/vendor/magento/module-braintree/Gateway/Request/ChannelDataBuilder.php b/vendor/magento/module-braintree/Gateway/Request/ChannelDataBuilder.php
2+
--- a/vendor/magento/module-braintree/Gateway/Request/ChannelDataBuilder.php
3+
+++ b/vendor/magento/module-braintree/Gateway/Request/ChannelDataBuilder.php
4+
@@ -26,7 +26,7 @@
5+
/**
6+
* @var string
7+
*/
8+
- private static $channelValue = 'Magento2_Cart_%s_BT';
9+
+ private static $channelValue = 'Magento_Enterprise_Cloud_BT';
10+
11+
/**
12+
* Constructor
13+
@@ -44,7 +44,7 @@
14+
public function build(array $buildSubject)
15+
{
16+
return [
17+
- self::$channel => sprintf(self::$channelValue, $this->productMetadata->getEdition())
18+
+ self::$channel => self::$channelValue
19+
];
20+
}
21+
}
22+
diff -Nuar a/vendor/magento/module-braintree/Test/Unit/Gateway/Request/ChannelDataBuilderTest.php b/vendor/magento/module-braintree/Test/Unit/Gateway/Request/ChannelDataBuilderTest.php
23+
--- a/vendor/magento/module-braintree/Test/Unit/Gateway/Request/ChannelDataBuilderTest.php
24+
+++ b/vendor/magento/module-braintree/Test/Unit/Gateway/Request/ChannelDataBuilderTest.php
25+
@@ -40,7 +40,7 @@
26+
public function testBuild($edition, array $expected)
27+
{
28+
$buildSubject = [];
29+
- $this->productMetadataMock->expects(static::once())
30+
+ $this->productMetadataMock->expects(static::never())
31+
->method('getEdition')
32+
->willReturn($edition);
33+
34+
@@ -54,8 +54,8 @@
35+
public function buildDataProvider()
36+
{
37+
return [
38+
- ['FirstEdition', ['channel' => 'Magento2_Cart_FirstEdition_BT']],
39+
- ['SecondEdition', ['channel' => 'Magento2_Cart_SecondEdition_BT']],
40+
+ ['FirstEdition', ['channel' => 'Magento_Enterprise_Cloud_BT']],
41+
+ ['SecondEdition', ['channel' => 'Magento_Enterprise_Cloud_BT']],
42+
];
43+
}
44+
}

patches/MAGETWO-53941__fix_enterprise_payment_codes__2.1.8.patch

Lines changed: 0 additions & 93 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
diff -Nuar a/vendor/magento/module-paypal/Model/AbstractConfig.php b/vendor/magento/module-paypal/Model/AbstractConfig.php
2+
--- a/vendor/magento/module-paypal/Model/AbstractConfig.php
3+
+++ b/vendor/magento/module-paypal/Model/AbstractConfig.php
4+
@@ -59,7 +59,7 @@
5+
/**
6+
* @var string
7+
*/
8+
- private static $bnCode = 'Magento_Cart_%s';
9+
+ private static $bnCode = 'Magento_Enterprise_Cloud';
10+
11+
/**
12+
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
13+
@@ -335,7 +335,7 @@
14+
*/
15+
public function getBuildNotationCode()
16+
{
17+
- return sprintf(self::$bnCode, $this->getProductMetadata()->getEdition());
18+
+ return self::$bnCode;
19+
}
20+
21+
/**
22+
diff -Nuar a/vendor/magento/module-paypal/Test/Unit/Model/AbstractConfigTest.php b/vendor/magento/module-paypal/Test/Unit/Model/AbstractConfigTest.php
23+
--- a/vendor/magento/module-paypal/Test/Unit/Model/AbstractConfigTest.php
24+
+++ b/vendor/magento/module-paypal/Test/Unit/Model/AbstractConfigTest.php
25+
@@ -293,7 +293,7 @@
26+
public function testGetBuildNotationCode()
27+
{
28+
$productMetadata = $this->getMock(ProductMetadataInterface::class, [], [], '', false);
29+
- $productMetadata->expects($this->once())
30+
+ $productMetadata->expects($this->never())
31+
->method('getEdition')
32+
->will($this->returnValue('SomeEdition'));
33+
34+
@@ -304,6 +304,6 @@
35+
$productMetadata
36+
);
37+
38+
- $this->assertEquals('Magento_Cart_SomeEdition', $this->config->getBuildNotationCode());
39+
+ $this->assertEquals('Magento_Enterprise_Cloud', $this->config->getBuildNotationCode());
40+
}
41+
}

0 commit comments

Comments
 (0)