Skip to content

Commit ae1d33a

Browse files
authored
Merge branch '2.4-develop' into add-action-group-click-next-button-on-checkout
2 parents 6066e18 + d822601 commit ae1d33a

File tree

11 files changed

+431
-189
lines changed

11 files changed

+431
-189
lines changed

app/code/Magento/Paypal/Model/AbstractConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ abstract class AbstractConfig implements ConfigInterface
5858
/**
5959
* @var string
6060
*/
61-
private static $bnCode = 'Magento_Cart_%s';
61+
private static $bnCode = 'Magento_2_%s';
6262

6363
/**
6464
* @var \Magento\Framework\App\Config\ScopeConfigInterface

app/code/Magento/Paypal/Test/Unit/Model/AbstractConfigTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
use PHPUnit\Framework\MockObject\MockObject;
1616
use PHPUnit\Framework\TestCase;
1717

18+
/**
19+
* Test for \Magento\Paypal\Model\AbstractConfig
20+
*/
1821
class AbstractConfigTest extends TestCase
1922
{
2023

@@ -353,7 +356,7 @@ public function testGetBuildNotationCode()
353356
$productMetadata
354357
);
355358

356-
self::assertEquals('Magento_Cart_SomeEdition', $this->config->getBuildNotationCode());
359+
self::assertEquals('Magento_2_SomeEdition', $this->config->getBuildNotationCode());
357360
}
358361

359362
/**

dev/tests/integration/testsuite/Magento/Paypal/Model/Api/NvpTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function testRequestTotalsAndLineItemsWithFPT()
9595
. '&SHIPPINGAMT=0.00&ITEMAMT=112.70&TAXAMT=0.00'
9696
. '&L_NAME0=Simple+Product+FPT&L_QTY0=1&L_AMT0=100.00'
9797
. '&L_NAME1=FPT&L_QTY1=1&L_AMT1=12.70'
98-
. '&METHOD=SetExpressCheckout&VERSION=72.0&BUTTONSOURCE=Magento_Cart_';
98+
. '&METHOD=SetExpressCheckout&VERSION=72.0&BUTTONSOURCE=Magento_2_';
9999

100100
$this->httpClient->method('write')
101101
->with(
@@ -146,7 +146,7 @@ public function testCallRefundTransaction()
146146

147147
$httpQuery = 'TRANSACTIONID=fooTransactionId&REFUNDTYPE=Partial'
148148
.'&CURRENCYCODE=USD&AMT=145.98&METHOD=RefundTransaction'
149-
.'&VERSION=72.0&BUTTONSOURCE=Magento_Cart_';
149+
.'&VERSION=72.0&BUTTONSOURCE=Magento_2_';
150150

151151
$this->httpClient->expects($this->once())->method('write')
152152
->with(

dev/tests/integration/testsuite/Magento/Paypal/Model/Api/PayflowNvpTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function testRequestLineItems()
9595
. 'L_NAME1=Simple 2&L_QTY1=2&L_COST1=9.69&'
9696
. 'L_NAME2=Simple 3&L_QTY2=3&L_COST2=11.69&'
9797
. 'L_NAME3=Discount&L_QTY3=1&L_COST3=-10.00&'
98-
. 'TRXTYPE=A&ACTION=S&BUTTONSOURCE=Magento_Cart_';
98+
. 'TRXTYPE=A&ACTION=S&BUTTONSOURCE=Magento_2_';
9999

100100
$this->httpClient->method('write')
101101
->with(

dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Customer/PlaceOrderWithPayflowLinkTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,14 @@ public function testResolvePlaceOrderWithPayflowLinkForCustomer(): void
119119
cart_id: "$cartId"
120120
payment_method: {
121121
code: "$paymentMethod"
122-
payflow_link:
122+
payflow_link:
123123
{
124124
cancel_url:"paypal/payflow/cancelPayment"
125125
return_url:"paypal/payflow/returnUrl"
126126
error_url:"paypal/payflow/errorUrl"
127127
}
128128
}
129-
}) {
129+
}) {
130130
cart {
131131
selected_payment_method {
132132
code
@@ -142,7 +142,7 @@ public function testResolvePlaceOrderWithPayflowLinkForCustomer(): void
142142
QUERY;
143143

144144
$productMetadata = ObjectManager::getInstance()->get(ProductMetadataInterface::class);
145-
$button = 'Magento_Cart_' . $productMetadata->getEdition();
145+
$button = 'Magento_2_' . $productMetadata->getEdition();
146146

147147
$payflowLinkResponse = new DataObject(
148148
[

dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PlaceOrderWithPayflowLinkTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ public function testResolvePlaceOrderWithPayflowLink(): void
117117
cart_id: "$cartId"
118118
payment_method: {
119119
code: "$paymentMethod"
120-
payflow_link:
120+
payflow_link:
121121
{
122122
cancel_url:"paypal/payflow/cancel"
123123
return_url:"paypal/payflow/return"
124124
error_url:"paypal/payflow/error"
125125
}
126126
}
127-
}) {
127+
}) {
128128
cart {
129129
selected_payment_method {
130130
code
@@ -140,7 +140,7 @@ public function testResolvePlaceOrderWithPayflowLink(): void
140140
QUERY;
141141

142142
$productMetadata = ObjectManager::getInstance()->get(ProductMetadataInterface::class);
143-
$button = 'Magento_Cart_' . $productMetadata->getEdition();
143+
$button = 'Magento_2_' . $productMetadata->getEdition();
144144

145145
$payflowLinkResponse = new DataObject(
146146
[
@@ -219,14 +219,14 @@ public function testResolveWithPayflowLinkDeclined(): void
219219
cart_id: "$cartId"
220220
payment_method: {
221221
code: "$paymentMethod"
222-
payflow_link:
222+
payflow_link:
223223
{
224224
cancel_url:"paypal/payflow/cancelPayment"
225225
return_url:"paypal/payflow/returnUrl"
226226
error_url:"paypal/payflow/returnUrl"
227227
}
228228
}
229-
}) {
229+
}) {
230230
cart {
231231
selected_payment_method {
232232
code

dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PlaceOrderWithPaymentsAdvancedTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function testResolvePlaceOrderWithPaymentsAdvanced(): void
108108
$cartId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');
109109

110110
$productMetadata = ObjectManager::getInstance()->get(ProductMetadataInterface::class);
111-
$button = 'Magento_Cart_' . $productMetadata->getEdition();
111+
$button = 'Magento_2_' . $productMetadata->getEdition();
112112

113113
$payflowLinkResponse = new DataObject(
114114
[
@@ -256,7 +256,7 @@ private function setPaymentMethodAndPlaceOrder(string $cartId, string $paymentMe
256256
error_url:"paypal/payflowadvanced/customerror"
257257
}
258258
}
259-
}) {
259+
}) {
260260
cart {
261261
selected_payment_method {
262262
code
@@ -300,7 +300,7 @@ private function setPaymentMethodWithInValidUrl(string $cartId, string $paymentM
300300
error_url:"paypal/payflowadvanced/error"
301301
}
302302
}
303-
}) {
303+
}) {
304304
cart {
305305
selected_payment_method {
306306
code

dev/tests/integration/testsuite/Magento/PaypalGraphQl/_files/paypal_place_order_request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
$notifyUrl = $url->getUrl('paypal/ipn/');
1414

1515
$productMetadata = ObjectManager::getInstance()->get(ProductMetadataInterface::class);
16-
$button = 'Magento_Cart_' . $productMetadata->getEdition();
16+
$button = 'Magento_2_' . $productMetadata->getEdition();
1717

1818
return [
1919
'TOKEN' => $token,

dev/tests/static/framework/Magento/TestFramework/Dependency/PhpRule.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,9 @@ private function caseClassesAndIdentifiers($currentModule, $file, &$contents)
167167
'[_\\\\]|',
168168
Files::init()->getNamespaces()
169169
)
170-
. '[_\\\\])[a-zA-Z0-9]+)'
171-
. '(?<class_inside_module>[a-zA-Z0-9_\\\\]*))\b(?:::(?<module_scoped_key>[a-z0-9_]+)[\'"])?~';
170+
. '(?<delimiter>[_\\\\]))[a-zA-Z0-9]{2,})'
171+
. '(?<class_inside_module>\\4[a-zA-Z0-9_\\\\]{2,})?)\b'
172+
. '(?:::(?<module_scoped_key>[A-Za-z0-9_/.]+)[\'"])?~';
172173

173174
if (!preg_match_all($pattern, $contents, $matches)) {
174175
return [];

lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2776,7 +2776,7 @@ public function addIndex(
27762776
if (in_array(strtolower($indexType), ['primary', 'unique'])) {
27772777
$match = [];
27782778
// phpstan:ignore
2779-
if (preg_match('#SQLSTATE\[23000\]: [^:]+: 1062[^\']+\'([\d-\.]+)\'#', $e->getMessage(), $match)) {
2779+
if (preg_match('#SQLSTATE\[23000\]: [^:]+: 1062[^\']+\'([\d.-]+)\'#', $e->getMessage(), $match)) {
27802780
$ids = explode('-', $match[1]);
27812781
$this->_removeDuplicateEntry($tableName, $fields, $ids);
27822782
continue;
@@ -2788,6 +2788,7 @@ public function addIndex(
27882788

27892789
$this->resetDdlCache($tableName, $schemaName);
27902790

2791+
// @phpstan-ignore-next-line
27912792
return $result;
27922793
}
27932794

0 commit comments

Comments
 (0)