Replace deprecated array types with Doctrine's ArrayParameterType
[MAILPOET-6142]
This commit is contained in:
@@ -7,6 +7,7 @@ use MailPoet\Entities\ScheduledTaskEntity;
|
||||
use MailPoet\Entities\SendingQueueEntity;
|
||||
use MailPoet\Migrator\AppMigration;
|
||||
use MailPoet\WooCommerce\Helper;
|
||||
use MailPoetVendor\Doctrine\DBAL\ArrayParameterType;
|
||||
use MailPoetVendor\Doctrine\DBAL\Connection;
|
||||
|
||||
/**
|
||||
@@ -44,7 +45,7 @@ class Migration_20231128_120355_App extends AppMigration {
|
||||
'newsletterTypes' => $newsletterTypes,
|
||||
'taskStatus' => $statusCompleted,
|
||||
], [
|
||||
'newsletterTypes' => Connection::PARAM_STR_ARRAY,
|
||||
'newsletterTypes' => ArrayParameterType::STRING,
|
||||
]);
|
||||
|
||||
// Fix data for scheduled tasks
|
||||
@@ -62,7 +63,7 @@ class Migration_20231128_120355_App extends AppMigration {
|
||||
'newsletterTypes' => $newsletterTypes,
|
||||
'taskStatus' => $statusScheduled,
|
||||
], [
|
||||
'newsletterTypes' => Connection::PARAM_STR_ARRAY,
|
||||
'newsletterTypes' => ArrayParameterType::STRING,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@@ -8,7 +8,7 @@ use MailPoet\Entities\ScheduledTaskSubscriberEntity;
|
||||
use MailPoet\Entities\SendingQueueEntity;
|
||||
use MailPoet\Entities\StatisticsNewsletterEntity;
|
||||
use MailPoet\Migrator\AppMigration;
|
||||
use MailPoetVendor\Doctrine\DBAL\Connection;
|
||||
use MailPoetVendor\Doctrine\DBAL\ArrayParameterType;
|
||||
|
||||
/**
|
||||
* We've had a set of bugs where campaign type newsletters (see NewsletterEntity::CAMPAIGN_TYPES),
|
||||
@@ -119,7 +119,7 @@ class Migration_20240207_105912_App extends AppMigration {
|
||||
WHERE t.id IN (:ids)
|
||||
",
|
||||
['sent' => NewsletterEntity::STATUS_SENT, 'ids' => $ids],
|
||||
['ids' => Connection::PARAM_INT_ARRAY]
|
||||
['ids' => ArrayParameterType::INTEGER]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ class Migration_20240207_105912_App extends AppMigration {
|
||||
WHERE q.newsletter_id IN (:ids)
|
||||
",
|
||||
['ids' => $ids],
|
||||
['ids' => Connection::PARAM_INT_ARRAY]
|
||||
['ids' => ArrayParameterType::INTEGER]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@ namespace MailPoet\Migrations\App;
|
||||
use MailPoet\Entities\StatisticsWooCommercePurchaseEntity;
|
||||
use MailPoet\Migrator\AppMigration;
|
||||
use MailPoet\WooCommerce\Helper;
|
||||
use MailPoetVendor\Doctrine\DBAL\Connection;
|
||||
use MailPoetVendor\Doctrine\DBAL\ArrayParameterType;
|
||||
|
||||
class Migration_20240322_110443_App extends AppMigration {
|
||||
public function run(): void {
|
||||
@@ -46,7 +46,7 @@ class Migration_20240322_110443_App extends AppMigration {
|
||||
$orders = $this->entityManager->getConnection()->executeQuery(
|
||||
$query,
|
||||
['orderIds' => $orderIds],
|
||||
['orderIds' => Connection::PARAM_INT_ARRAY],
|
||||
['orderIds' => ArrayParameterType::INTEGER],
|
||||
)->fetchAllAssociative();
|
||||
|
||||
foreach ($orders as $order) {
|
||||
|
@@ -5,7 +5,7 @@ namespace MailPoet\Migrations\Db;
|
||||
use MailPoet\Entities\SegmentEntity;
|
||||
use MailPoet\Entities\SettingEntity;
|
||||
use MailPoet\Migrator\DbMigration;
|
||||
use MailPoetVendor\Doctrine\DBAL\Connection;
|
||||
use MailPoetVendor\Doctrine\DBAL\ArrayParameterType;
|
||||
|
||||
class Migration_20230111_120000 extends DbMigration {
|
||||
public function run(): void {
|
||||
@@ -35,7 +35,7 @@ class Migration_20230111_120000 extends DbMigration {
|
||||
UPDATE {$segmentsTable}
|
||||
SET {$columnName} = 1
|
||||
WHERE id IN (?)
|
||||
", [$segmentIds], [Connection::PARAM_INT_ARRAY]);
|
||||
", [$segmentIds], [ArrayParameterType::INTEGER]);
|
||||
|
||||
$subscriptionSetting['segments'] = [];
|
||||
$this->connection->executeStatement(
|
||||
|
Reference in New Issue
Block a user