Skip to content

Commit 76e32bb

Browse files
authored
Merge branch '2.4-develop' into admin-indexer-massinvalidte
2 parents 1fa6f08 + 6bfdbd3 commit 76e32bb

File tree

1,740 files changed

+27083
-14980
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,740 files changed

+27083
-14980
lines changed

app/code/Magento/AdminAnalytics/registration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
use \Magento\Framework\Component\ComponentRegistrar;
7+
use Magento\Framework\Component\ComponentRegistrar;
88

99
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_AdminAnalytics', __DIR__);

app/code/Magento/AdminNotification/registration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
use \Magento\Framework\Component\ComponentRegistrar;
7+
use Magento\Framework\Component\ComponentRegistrar;
88

99
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_AdminNotification', __DIR__);

app/code/Magento/AdvancedPricingImportExport/registration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
use \Magento\Framework\Component\ComponentRegistrar;
7+
use Magento\Framework\Component\ComponentRegistrar;
88

99
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_AdvancedPricingImportExport', __DIR__);

app/code/Magento/AdvancedSearch/registration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
use \Magento\Framework\Component\ComponentRegistrar;
7+
use Magento\Framework\Component\ComponentRegistrar;
88

99
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_AdvancedSearch', __DIR__);

app/code/Magento/Amqp/registration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
use \Magento\Framework\Component\ComponentRegistrar;
7+
use Magento\Framework\Component\ComponentRegistrar;
88

99
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_Amqp', __DIR__);

app/code/Magento/AmqpStore/registration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
use \Magento\Framework\Component\ComponentRegistrar;
7+
use Magento\Framework\Component\ComponentRegistrar;
88

99
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_AmqpStore', __DIR__);

app/code/Magento/AsynchronousOperations/Model/OperationProcessor.php

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,24 @@
88

99
namespace Magento\AsynchronousOperations\Model;
1010

11-
use Magento\Framework\Serialize\Serializer\Json;
1211
use Magento\AsynchronousOperations\Api\Data\OperationInterface;
13-
use Magento\Framework\Bulk\OperationManagementInterface;
1412
use Magento\AsynchronousOperations\Model\ConfigInterface as AsyncConfig;
15-
use Magento\Framework\MessageQueue\MessageValidator;
16-
use Magento\Framework\MessageQueue\MessageEncoder;
17-
use Magento\Framework\Exception\NoSuchEntityException;
18-
use Magento\Framework\MessageQueue\ConsumerConfigurationInterface;
19-
use Psr\Log\LoggerInterface;
20-
use Magento\Framework\Exception\LocalizedException;
21-
use Magento\Framework\Exception\TemporaryStateExceptionInterface;
13+
use Magento\Framework\Bulk\OperationManagementInterface;
14+
use Magento\Framework\Communication\ConfigInterface as CommunicationConfig;
2215
use Magento\Framework\DB\Adapter\ConnectionException;
2316
use Magento\Framework\DB\Adapter\DeadlockException;
2417
use Magento\Framework\DB\Adapter\LockWaitException;
18+
use Magento\Framework\Exception\LocalizedException;
19+
use Magento\Framework\Exception\NoSuchEntityException;
20+
use Magento\Framework\MessageQueue\ConsumerConfigurationInterface;
21+
use Magento\Framework\MessageQueue\MessageEncoder;
22+
use Magento\Framework\MessageQueue\MessageValidator;
23+
use Magento\Framework\Serialize\Serializer\Json;
2524
use Magento\Framework\Webapi\ServiceOutputProcessor;
26-
use Magento\Framework\Communication\ConfigInterface as CommunicationConfig;
25+
use Psr\Log\LoggerInterface;
2726

2827
/**
29-
* Class OperationProcessor
28+
* Proccess operation
3029
*
3130
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
3231
*/
@@ -80,9 +79,9 @@ class OperationProcessor
8079
* @param ConsumerConfigurationInterface $configuration
8180
* @param Json $jsonHelper
8281
* @param OperationManagementInterface $operationManagement
83-
* @param LoggerInterface $logger
8482
* @param \Magento\Framework\Webapi\ServiceOutputProcessor $serviceOutputProcessor
8583
* @param \Magento\Framework\Communication\ConfigInterface $communicationConfig
84+
* @param LoggerInterface $logger
8685
*/
8786
public function __construct(
8887
MessageValidator $messageValidator,
@@ -137,7 +136,9 @@ public function process(string $encodedMessage)
137136
$result = $this->executeHandler($callback, $entityParams);
138137
$status = $result['status'];
139138
$errorCode = $result['error_code'];
139+
// phpcs:disable Magento2.Performance.ForeachArrayMerge
140140
$messages = array_merge($messages, $result['messages']);
141+
// phpcs:enable Magento2.Performance.ForeachArrayMerge
141142
$outputData = $result['output_data'];
142143
}
143144
}
@@ -174,8 +175,8 @@ public function process(string $encodedMessage)
174175
/**
175176
* Execute topic handler
176177
*
177-
* @param $callback
178-
* @param $entityParams
178+
* @param callable $callback
179+
* @param array $entityParams
179180
* @return array
180181
*/
181182
private function executeHandler($callback, $entityParams)
@@ -187,7 +188,9 @@ private function executeHandler($callback, $entityParams)
187188
'output_data' => null
188189
];
189190
try {
191+
// phpcs:disable Magento2.Functions.DiscouragedFunction
190192
$result['output_data'] = call_user_func_array($callback, $entityParams);
193+
// phpcs:enable Magento2.Functions.DiscouragedFunction
191194
$result['messages'][] = sprintf('Service execution success %s::%s', get_class($callback[0]), $callback[1]);
192195
} catch (\Zend_Db_Adapter_Exception $e) {
193196
$this->logger->critical($e->getMessage());
@@ -206,9 +209,7 @@ private function executeHandler($callback, $entityParams)
206209
}
207210
} catch (NoSuchEntityException $e) {
208211
$this->logger->error($e->getMessage());
209-
$result['status'] = ($e instanceof TemporaryStateExceptionInterface) ?
210-
OperationInterface::STATUS_TYPE_NOT_RETRIABLY_FAILED :
211-
OperationInterface::STATUS_TYPE_NOT_RETRIABLY_FAILED;
212+
$result['status'] = OperationInterface::STATUS_TYPE_NOT_RETRIABLY_FAILED;
212213
$result['error_code'] = $e->getCode();
213214
$result['messages'][] = $e->getMessage();
214215
} catch (LocalizedException $e) {

app/code/Magento/AsynchronousOperations/registration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
use \Magento\Framework\Component\ComponentRegistrar;
7+
use Magento\Framework\Component\ComponentRegistrar;
88

99
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_AsynchronousOperations', __DIR__);

app/code/Magento/Authorization/registration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
use \Magento\Framework\Component\ComponentRegistrar;
7+
use Magento\Framework\Component\ComponentRegistrar;
88

99
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_Authorization', __DIR__);

app/code/Magento/Authorizenet/registration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
use \Magento\Framework\Component\ComponentRegistrar;
7+
use Magento\Framework\Component\ComponentRegistrar;
88

99
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_Authorizenet', __DIR__);

0 commit comments

Comments
 (0)