Skip to content

Commit 36703c1

Browse files
committed
Merge branch '2.4.5-develop' of github.com:magento-gl/magento2ce into AC-3632
2 parents f0db7b1 + 4048f18 commit 36703c1

File tree

9 files changed

+28
-16
lines changed

9 files changed

+28
-16
lines changed

app/code/Magento/Elasticsearch/SearchAdapter/Query/Builder/Sort.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function getSort(RequestInterface $request)
9292
if (in_array($item['field'], $this->skippedFields)) {
9393
continue;
9494
}
95-
$attribute = $this->attributeAdapterProvider->getByAttributeCode($item['field']);
95+
$attribute = $this->attributeAdapterProvider->getByAttributeCode((string)$item['field']);
9696
$fieldName = $this->fieldNameResolver->getFieldName($attribute);
9797
if (isset($this->map[$fieldName])) {
9898
$fieldName = $this->map[$fieldName];

app/code/Magento/Multishipping/Model/Cart/MultishippingClearItemAddress.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ public function clearAddressItem($subject, $request)
104104
$quote = $this->cartRepository->get($quote->getId());
105105
$this->cartmodel->setQuote($quote);
106106
}
107+
$this->checkoutSession->clearQuote();
107108
} elseif ($this->disableMultishipping->execute($quote) && $this->isVirtualItemInQuote($quote)) {
108109
$quote->setTotalsCollectedFlag(false);
109110
$this->cartRepository->save($quote);

app/code/Magento/Multishipping/Test/Unit/Model/Cart/MultishippingClearItemAddressTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ public function testClearAddressItem(
100100
->willReturn($actionName);
101101
$this->checkoutSessionMock->method('getQuote')
102102
->willReturn($quoteMock);
103-
103+
$this->checkoutSessionMock->method('clearQuote')
104+
->willReturnSelf();
104105
$addressMock = $this->createMock(Address::class);
105106
$addressMock->method('getId')
106107
->willReturn($addressId);

app/code/Magento/QuoteGraphQl/Model/Resolver/AvailablePaymentMethods.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,13 @@ private function getPaymentMethodsData(CartInterface $cart): array
8181
*/
8282
if ((int)$grandTotal === 0 && $carrierCode === self::FREE_SHIPPING_METHOD
8383
&& $paymentMethod->getCode() === self::FREE_PAYMENT_METHOD_CODE) {
84-
$paymentMethodsData[] = [
85-
'title' => $paymentMethod->getTitle(),
86-
'code' => $paymentMethod->getCode(),
84+
return [
85+
[
86+
'title' => $paymentMethod->getTitle(),
87+
'code' => $paymentMethod->getCode(),
88+
]
8789
];
88-
} elseif ((int)$grandTotal >= 0
89-
&& $carrierCode !== self::FREE_SHIPPING_METHOD) {
90+
} elseif ((int)$grandTotal >= 0) {
9091
$paymentMethodsData[] = [
9192
'title' => $paymentMethod->getTitle(),
9293
'code' => $paymentMethod->getCode(),

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"magento/composer-dependency-version-audit-plugin": "~0.1",
6767
"magento/magento-composer-installer": ">=0.3.0",
6868
"magento/zendframework1": "~1.15.0",
69-
"monolog/monolog": "^2.6",
69+
"monolog/monolog": "^2.7",
7070
"pelago/emogrifier": "^6.0.0",
7171
"php-amqplib/php-amqplib": "~3.2.0",
7272
"phpseclib/mcrypt_compat": "~2.0.2",

composer.lock

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/integration/framework/Magento/TestFramework/ErrorLog/Logger.php

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

1010
use Magento\Framework\Logger\Monolog;
1111
use Monolog\Handler\HandlerInterface;
12+
use Monolog\DateTimeImmutable;
1213

1314
class Logger extends Monolog
1415
{
@@ -43,6 +44,8 @@ public function __construct(
4344
}
4445

4546
/**
47+
* Clear messages
48+
*
4649
* @return void
4750
*/
4851
public function clearMessages(): void
@@ -51,6 +54,8 @@ public function clearMessages(): void
5154
}
5255

5356
/**
57+
* Get messages
58+
*
5459
* @return array
5560
*/
5661
public function getMessages(): array
@@ -64,19 +69,21 @@ public function getMessages(): array
6469
* @param int $level The logging level
6570
* @param string $message The log message
6671
* @param array $context The log context
72+
* @param DateTimeImmutable $datetime Optional log date to log into the past or future
6773
* @return bool Whether the record has been processed
6874
*/
6975
public function addRecord(
7076
int $level,
7177
string $message,
72-
array $context = []
78+
array $context = [],
79+
DateTimeImmutable $datetime = null
7380
): bool {
7481
if ($level <= $this->minimumErrorLevel) {
7582
$this->messages[] = [
7683
'level' => $this->getLevelName($level),
7784
'message' => $message,
7885
];
7986
}
80-
return parent::addRecord($level, $message, $context);
87+
return parent::addRecord($level, $message, $context, $datetime);
8188
}
8289
}

lib/internal/Magento/Framework/DataObject.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ public function unsetData($key = null)
120120
* @param string $key
121121
* @param string|int $index
122122
* @return mixed
123+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
123124
*/
124125
public function getData($key = '', $index = null)
125126
{
@@ -128,7 +129,7 @@ public function getData($key = '', $index = null)
128129
}
129130

130131
/* process a/b/c key as ['a']['b']['c'] */
131-
if (strpos((string)$key, '/') !== false) {
132+
if ($key !== null && strpos($key, '/') !== false) {
132133
$data = $this->getDataByPath($key);
133134
} else {
134135
$data = $this->_getData($key);

lib/internal/Magento/Framework/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"laminas/laminas-validator": "^2.17.0",
3838
"magento/composer-dependency-version-audit-plugin": "~0.1",
3939
"magento/zendframework1": "~1.15.0",
40-
"monolog/monolog": "^2.6",
40+
"monolog/monolog": "^2.7",
4141
"ramsey/uuid": "~4.2.0",
4242
"symfony/console": "~4.4.0",
4343
"symfony/process": "~4.4.0",

0 commit comments

Comments
 (0)