Skip to content

Commit 39d401a

Browse files
authored
MDEE-943: Fix deprecation on DataExporter (#461)
1 parent 78402cc commit 39d401a

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

DataExporter/Model/Feed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function __construct(
7878
/**
7979
* @inheritDoc
8080
*/
81-
public function getFeedSince(string $timestamp, array $ignoredExportStatus = null): array
81+
public function getFeedSince(string $timestamp, ?array $ignoredExportStatus = null): array
8282
{
8383
$connection = $this->resourceConnection->getConnection();
8484
$limit = $connection->fetchOne(

DataExporter/Model/FeedInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ interface FeedInterface
3434
* @throws \Zend_Db_Statement_Exception
3535
* @see \Magento\DataExporter\Status\ExportStatusCode
3636
*/
37-
public function getFeedSince(string $timestamp, array $ignoredExportStatus = null): array;
37+
public function getFeedSince(string $timestamp, ?array $ignoredExportStatus = null): array;
3838

3939
/**
4040
* Get feed metadata

DataExporter/Model/Indexer/FeedIndexMetadata.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public function __construct(
204204
string $feedTableName,
205205
string $feedTableField = self::FEED_TABLE_FIELD_SOURCE_ENTITY_ID,
206206
array $feedTableMutableColumns = [],
207-
string $sourceTableIdentityField = null,
207+
?string $sourceTableIdentityField = null,
208208
int $fullReIndexSecondsLimit = 0,
209209
string $sourceTableFieldOnFullReIndexLimit = 'updated_at',
210210
bool $truncateFeedOnFullReindex = true,

DataExporter/Model/Indexer/FeedIndexProcessorCreateUpdate.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ public function partialReindex(
109109
DataSerializerInterface $serializer,
110110
EntityIdsProviderInterface $idsProvider,
111111
array $ids = [],
112-
callable $callback = null,
113-
IndexStateProvider $indexState = null
112+
?callable $callback = null,
113+
?IndexStateProvider $indexState = null
114114
): void {
115115
$isPartialReindex = $indexState === null;
116116
if ($isPartialReindex) {
@@ -271,7 +271,7 @@ private function truncateIndexTable(FeedIndexMetadata $metadata): void
271271
private function filterFeedItems(
272272
array $feedItems,
273273
FeedIndexMetadata $metadata,
274-
IndexStateProvider $indexStateProvider = null
274+
?IndexStateProvider $indexStateProvider = null
275275
) : array {
276276
if (empty($feedItems)) {
277277
return [[], []];

DataExporter/Model/Indexer/FeedIndexProcessorCreateUpdateDelete.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ public function partialReindex(
9696
DataSerializerInterface $serializer,
9797
EntityIdsProviderInterface $idsProvider,
9898
array $ids = [],
99-
callable $callback = null,
100-
IndexStateProvider $indexState = null
99+
?callable $callback = null,
100+
?IndexStateProvider $indexState = null
101101
): void {
102102
parent::partialReindex($metadata, $serializer, $idsProvider, $ids, $callback, $indexState);
103103
if (!$metadata->isExportImmediately()) {

DataExporter/Model/Indexer/FeedIndexProcessorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function partialReindex(
3939
EntityIdsProviderInterface $idsProvider,
4040
array $ids = [],
4141
?callable $callback = null,
42-
IndexStateProvider $indexState = null
42+
?IndexStateProvider $indexState = null
4343
): void;
4444

4545
/**

DataExporter/Model/Indexer/FeedIndexer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function __construct(
7272
FeedIndexMetadata $feedIndexMetadata,
7373
EntityIdsProviderInterface $entityIdsProvider,
7474
?CommerceDataExportLoggerInterface $logger = null,
75-
FeedLockManager $lockManager = null
75+
?FeedLockManager $lockManager = null
7676
) {
7777
$this->processor = $processor;
7878
$this->feedIndexMetadata = $feedIndexMetadata;

DataExporter/Model/Logging/Monolog.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function addRecord(
9090
$level,
9191
string $message,
9292
array $context = [],
93-
DateTimeImmutable $datetime = null
93+
?DateTimeImmutable $datetime = null
9494
): bool {
9595
// Check if Monolog\Level class exists (for Monolog 3.x+ compatibility)
9696
if (class_exists('\Monolog\Level')) {

DataExporter/Model/Query/FeedQuery.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function getLimitSelect(
5454
FeedIndexMetadata $metadata,
5555
string $modifiedAt,
5656
int $offset,
57-
array $ignoredExportStatus = null
57+
?array $ignoredExportStatus = null
5858
): Select {
5959
$modifiedAt = $modifiedAt === '1' ? (int)$modifiedAt : $modifiedAt;
6060
$connection = $this->resourceConnection->getConnection();
@@ -84,7 +84,7 @@ public function getDataSelect(
8484
FeedIndexMetadata $metadata,
8585
string $modifiedAt,
8686
?string $limit,
87-
array $ignoredExportStatus = null
87+
?array $ignoredExportStatus = null
8888
): Select {
8989
$modifiedAt = $modifiedAt === '1' ? (int)$modifiedAt : $modifiedAt;
9090
$connection = $this->resourceConnection->getConnection();

0 commit comments

Comments
 (0)