diff options
author | Joas Schilling <coding@schilljs.com> | 2024-07-03 11:37:11 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-07-03 11:37:11 +0200 |
commit | 880a3f2573499d4eaeb20cb08a4f2d44e2d3cf66 (patch) | |
tree | e28f9c78547e84aa1460edb71264d8b8ef5a5428 | |
parent | a3c275cacab1b70b949895fefbdc4876fd2afc04 (diff) |
fix(deps): Use less 3rdparty dependencies
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | lib/Migration/Version2001Date20170707115443.php | 5 | ||||
-rw-r--r-- | lib/Migration/Version2001Date20171026134605.php | 5 | ||||
-rw-r--r-- | lib/Migration/Version2001Date20180103144447.php | 3 | ||||
-rw-r--r-- | psalm.xml | 1 | ||||
-rw-r--r-- | tests/psalm-baseline.xml | 2 |
5 files changed, 6 insertions, 10 deletions
diff --git a/lib/Migration/Version2001Date20170707115443.php b/lib/Migration/Version2001Date20170707115443.php index 5c6276000..8782656ac 100644 --- a/lib/Migration/Version2001Date20170707115443.php +++ b/lib/Migration/Version2001Date20170707115443.php @@ -7,7 +7,6 @@ declare(strict_types=1); */ namespace OCA\Talk\Migration; -use Doctrine\DBAL\Platforms\PostgreSQLPlatform; use OCA\Talk\Participant; use OCA\Talk\Room; use OCP\DB\ISchemaWrapper; @@ -103,7 +102,7 @@ class Version2001Date20170707115443 extends SimpleMigrationStep { protected function makeOne2OneParticipantsOwners(array $one2oneRooms): int { $update = $this->db->getQueryBuilder(); - if (!$this->db->getDatabasePlatform() instanceof PostgreSQLPlatform) { + if ($this->db->getDatabaseProvider() !== IDBConnection::PLATFORM_POSTGRES) { $update->update('spreedme_room_participants') ->set('participantType', $update->createNamedParameter(Participant::OWNER)) ->where($update->expr()->in('roomId', $update->createNamedParameter($one2oneRooms, IQueryBuilder::PARAM_INT_ARRAY))); @@ -123,7 +122,7 @@ class Version2001Date20170707115443 extends SimpleMigrationStep { protected function makeGroupParticipantsModerators(array $one2oneRooms): int { $update = $this->db->getQueryBuilder(); - if (!$this->db->getDatabasePlatform() instanceof PostgreSQLPlatform) { + if ($this->db->getDatabaseProvider() !== IDBConnection::PLATFORM_POSTGRES) { $update->update('spreedme_room_participants') ->set('participantType', $update->createNamedParameter(Participant::MODERATOR)) ->where($update->expr()->nonEmptyString('userId')); diff --git a/lib/Migration/Version2001Date20171026134605.php b/lib/Migration/Version2001Date20171026134605.php index dc5381c25..f32388c8d 100644 --- a/lib/Migration/Version2001Date20171026134605.php +++ b/lib/Migration/Version2001Date20171026134605.php @@ -9,7 +9,6 @@ namespace OCA\Talk\Migration; use Doctrine\DBAL\Exception\InvalidFieldNameException; use Doctrine\DBAL\Exception\TableNotFoundException; -use Doctrine\DBAL\Platforms\PostgreSQLPlatform; use OCP\DB\ISchemaWrapper; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\DB\Types; @@ -193,7 +192,7 @@ class Version2001Date20171026134605 extends SimpleMigrationStep { */ protected function copyParticipants(array $roomIdMap): void { $insert = $this->connection->getQueryBuilder(); - if (!$this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform) { + if ($this->connection->getDatabaseProvider() !== IDBConnection::PLATFORM_POSTGRES) { $insert->insert('talk_participants') ->values([ 'userId' => $insert->createParameter('userId'), @@ -229,7 +228,7 @@ class Version2001Date20171026134605 extends SimpleMigrationStep { ->setParameter('lastPing', (int) $row['lastPing'], IQueryBuilder::PARAM_INT) ->setParameter('sessionId', $row['sessionId']) ; - if (!$this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform) { + if ($this->connection->getDatabaseProvider() !== IDBConnection::PLATFORM_POSTGRES) { $insert->setParameter('participantType', (int) $row['participantType'], IQueryBuilder::PARAM_INT); } else { $insert->setParameter('participantType', (int) $row['participanttype'], IQueryBuilder::PARAM_INT); diff --git a/lib/Migration/Version2001Date20180103144447.php b/lib/Migration/Version2001Date20180103144447.php index de96d7376..72bab48f0 100644 --- a/lib/Migration/Version2001Date20180103144447.php +++ b/lib/Migration/Version2001Date20180103144447.php @@ -7,7 +7,6 @@ declare(strict_types=1); */ namespace OCA\Talk\Migration; -use Doctrine\DBAL\Platforms\PostgreSQLPlatform; use OCP\DB\ISchemaWrapper; use OCP\DB\Types; use OCP\IConfig; @@ -99,7 +98,7 @@ class Version2001Date20180103144447 extends SimpleMigrationStep { return; } - if (!$this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform) { + if ($this->connection->getDatabaseProvider() !== IDBConnection::PLATFORM_POSTGRES) { $update = $this->connection->getQueryBuilder(); $update->update('talk_rooms') ->set('active_since', 'activeSince') @@ -32,7 +32,6 @@ <referencedClass name="Doctrine\DBAL\Exception\InvalidFieldNameException" /> <referencedClass name="Doctrine\DBAL\Exception\TableNotFoundException" /> <referencedClass name="Doctrine\DBAL\Exception\UniqueConstraintViolationException" /> - <referencedClass name="Doctrine\DBAL\Platforms\PostgreSQLPlatform" /> <referencedClass name="GuzzleHttp\Exception\ClientException" /> <referencedClass name="GuzzleHttp\Exception\ServerException" /> <referencedClass name="GuzzleHttp\Exception\ConnectException" /> diff --git a/tests/psalm-baseline.xml b/tests/psalm-baseline.xml index 54bcce7bd..cbf0aa799 100644 --- a/tests/psalm-baseline.xml +++ b/tests/psalm-baseline.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<files psalm-version="5.23.1@8471a896ccea3526b26d082f4461eeea467f10a4"> +<files psalm-version="5.25.0@01a8eb06b9e9cc6cfb6a320bf9fb14331919d505"> <file src="lib/AppInfo/Application.php"> <UndefinedClass> <code><![CDATA[BeforeTemplateRenderedEvent]]></code> |