Browse Source

Move away from private and deprecated classes

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/10672/head
Joas Schilling 2 years ago
parent
commit
a57dbcbb52
No known key found for this signature in database GPG Key ID: 74434EFE0D2E2205
  1. 2
      lib/Migration/Version10000Date20200819121721.php
  2. 2
      lib/Migration/Version10000Date20201012144235.php
  3. 2
      lib/Migration/Version10000Date20201015134000.php
  4. 2
      lib/Migration/Version11000Date20200922161218.php
  5. 2
      lib/Migration/Version11000Date20201011082810.php
  6. 2
      lib/Migration/Version11000Date20201201102528.php
  7. 2
      lib/Migration/Version11000Date20201204110210.php
  8. 2
      lib/Migration/Version11000Date20201209142525.php
  9. 2
      lib/Migration/Version11001Date20210211111527.php
  10. 1
      lib/Migration/Version12000Date20210528100404.php
  11. 2
      lib/Migration/Version13000Date20210625232111.php
  12. 2
      lib/Migration/Version13000Date20210901164235.php
  13. 2
      lib/Migration/Version13000Date20210921142733.php
  14. 2
      lib/Migration/Version13000Date20211007192733.php
  15. 2
      lib/Migration/Version14000Date20211203132513.php
  16. 2
      lib/Migration/Version14000Date20220330141647.php
  17. 2
      lib/Migration/Version2000Date20170707093535.php
  18. 8
      lib/Migration/Version2001Date20170707115443.php
  19. 2
      lib/Migration/Version2001Date20170913104501.php
  20. 2
      lib/Migration/Version2001Date20170921145301.php
  21. 4
      lib/Migration/Version2001Date20171009132424.php
  22. 10
      lib/Migration/Version2001Date20171026134605.php
  23. 2
      lib/Migration/Version2001Date20171031102049.php
  24. 8
      lib/Migration/Version2001Date20180103144447.php
  25. 2
      lib/Migration/Version3003Date20180707222130.php
  26. 4
      lib/Migration/Version3003Date20180718112436.php
  27. 2
      lib/Migration/Version3003Date20180718133519.php
  28. 2
      lib/Migration/Version3003Date20180720162342.php
  29. 2
      lib/Migration/Version3003Date20180722152849.php
  30. 4
      lib/Migration/Version3003Date20180730080327.php
  31. 2
      lib/Migration/Version4099Date20181001123058.php
  32. 2
      lib/Migration/Version5099Date20190121102337.php
  33. 2
      lib/Migration/Version5099Date20190319134820.php
  34. 4
      lib/Migration/Version6099Date20190627172429.php
  35. 4
      lib/Migration/Version7000Date20190717141457.php
  36. 2
      lib/Migration/Version7000Date20190724121136.php
  37. 2
      lib/Migration/Version8000Date20200407115318.php
  38. 3
      psalm.xml

2
lib/Migration/Version10000Date20200819121721.php

@ -26,8 +26,8 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version10000Date20201012144235.php

@ -26,8 +26,8 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version10000Date20201015134000.php

@ -27,13 +27,13 @@ namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
use Doctrine\DBAL\Types\Types;
use OCA\Talk\Model\Attendee;
use OCA\Talk\Participant;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\DB\Exception;
use OCP\DB\ISchemaWrapper;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\DB\Types;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version11000Date20200922161218.php

@ -26,9 +26,9 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\DB\Types;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version11000Date20201011082810.php

@ -26,8 +26,8 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version11000Date20201201102528.php

@ -24,8 +24,8 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version11000Date20201204110210.php

@ -26,8 +26,8 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version11000Date20201209142525.php

@ -26,8 +26,8 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version11001Date20210211111527.php

@ -26,8 +26,8 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

1
lib/Migration/Version12000Date20210528100404.php

@ -26,7 +26,6 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version13000Date20210625232111.php

@ -27,8 +27,8 @@ namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Schema\SchemaException;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version13000Date20210901164235.php

@ -26,8 +26,8 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version13000Date20210921142733.php

@ -26,8 +26,8 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version13000Date20211007192733.php

@ -26,9 +26,9 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCA\Talk\Participant;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version14000Date20211203132513.php

@ -26,8 +26,8 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version14000Date20220330141647.php

@ -26,10 +26,10 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCA\Talk\Model\Attachment;
use OCP\DB\ISchemaWrapper;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\DB\Types;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version2000Date20170707093535.php

@ -24,8 +24,8 @@ declare(strict_types=1);
*/
namespace OCA\Talk\Migration;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

8
lib/Migration/Version2001Date20170707115443.php

@ -24,12 +24,12 @@ declare(strict_types=1);
*/
namespace OCA\Talk\Migration;
use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
use Doctrine\DBAL\Types\Types;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use OCA\Talk\Participant;
use OCA\Talk\Room;
use OCP\DB\ISchemaWrapper;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\DB\Types;
use OCP\IConfig;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
@ -120,7 +120,7 @@ class Version2001Date20170707115443 extends SimpleMigrationStep {
protected function makeOne2OneParticipantsOwners(array $one2oneRooms): int {
$update = $this->db->getQueryBuilder();
if (!$this->db->getDatabasePlatform() instanceof PostgreSQL94Platform) {
if (!$this->db->getDatabasePlatform() instanceof PostgreSQLPlatform) {
$update->update('spreedme_room_participants')
->set('participantType', $update->createNamedParameter(Participant::OWNER))
->where($update->expr()->in('roomId', $update->createNamedParameter($one2oneRooms, IQueryBuilder::PARAM_INT_ARRAY)));
@ -140,7 +140,7 @@ class Version2001Date20170707115443 extends SimpleMigrationStep {
protected function makeGroupParticipantsModerators(array $one2oneRooms): int {
$update = $this->db->getQueryBuilder();
if (!$this->db->getDatabasePlatform() instanceof PostgreSQL94Platform) {
if (!$this->db->getDatabasePlatform() instanceof PostgreSQLPlatform) {
$update->update('spreedme_room_participants')
->set('participantType', $update->createNamedParameter(Participant::MODERATOR))
->where($update->expr()->nonEmptyString('userId'));

2
lib/Migration/Version2001Date20170913104501.php

@ -24,8 +24,8 @@ declare(strict_types=1);
*/
namespace OCA\Talk\Migration;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version2001Date20170921145301.php

@ -24,8 +24,8 @@ declare(strict_types=1);
*/
namespace OCA\Talk\Migration;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

4
lib/Migration/Version2001Date20171009132424.php

@ -24,8 +24,8 @@ declare(strict_types=1);
*/
namespace OCA\Talk\Migration;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
@ -42,7 +42,7 @@ class Version2001Date20171009132424 extends SimpleMigrationStep {
$schema = $schemaClosure();
$table = $schema->getTable('spreedme_rooms');
$table->addColumn('activeSince', Types::DATETIME_MUTABLE, [
$table->addColumn('activeSince', Types::DATETIME, [
'notnull' => false,
]);
$table->addColumn('activeGuests', Types::INTEGER, [

10
lib/Migration/Version2001Date20171026134605.php

@ -26,10 +26,10 @@ namespace OCA\Talk\Migration;
use Doctrine\DBAL\Exception\InvalidFieldNameException;
use Doctrine\DBAL\Exception\TableNotFoundException;
use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
use Doctrine\DBAL\Types\Types;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use OCP\DB\ISchemaWrapper;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\DB\Types;
use OCP\IConfig;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
@ -108,7 +108,7 @@ class Version2001Date20171026134605 extends SimpleMigrationStep {
'length' => 255,
'default' => '',
]);
$table->addColumn('activeSince', Types::DATETIME_MUTABLE, [
$table->addColumn('activeSince', Types::DATETIME, [
'notnull' => false,
]);
$table->addColumn('activeGuests', Types::INTEGER, [
@ -210,7 +210,7 @@ class Version2001Date20171026134605 extends SimpleMigrationStep {
*/
protected function copyParticipants(array $roomIdMap): void {
$insert = $this->connection->getQueryBuilder();
if (!$this->connection->getDatabasePlatform() instanceof PostgreSQL94Platform) {
if (!$this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform) {
$insert->insert('talk_participants')
->values([
'userId' => $insert->createParameter('userId'),
@ -246,7 +246,7 @@ class Version2001Date20171026134605 extends SimpleMigrationStep {
->setParameter('lastPing', (int) $row['lastPing'], IQueryBuilder::PARAM_INT)
->setParameter('sessionId', $row['sessionId'])
;
if (!$this->connection->getDatabasePlatform() instanceof PostgreSQL94Platform) {
if (!$this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform) {
$insert->setParameter('participantType', (int) $row['participantType'], IQueryBuilder::PARAM_INT);
} else {
$insert->setParameter('participantType', (int) $row['participanttype'], IQueryBuilder::PARAM_INT);

2
lib/Migration/Version2001Date20171031102049.php

@ -24,8 +24,8 @@ declare(strict_types=1);
*/
namespace OCA\Talk\Migration;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

8
lib/Migration/Version2001Date20180103144447.php

@ -24,9 +24,9 @@ declare(strict_types=1);
*/
namespace OCA\Talk\Migration;
use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
use Doctrine\DBAL\Types\Types;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\IConfig;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
@ -55,7 +55,7 @@ class Version2001Date20180103144447 extends SimpleMigrationStep {
$table = $schema->getTable('talk_rooms');
if (!$table->hasColumn('active_since')) {
$table->addColumn('active_since', Types::DATETIME_MUTABLE, [
$table->addColumn('active_since', Types::DATETIME, [
'notnull' => false,
]);
$table->addColumn('active_guests', Types::INTEGER, [
@ -116,7 +116,7 @@ class Version2001Date20180103144447 extends SimpleMigrationStep {
return;
}
if (!$this->connection->getDatabasePlatform() instanceof PostgreSQL94Platform) {
if (!$this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform) {
$update = $this->connection->getQueryBuilder();
$update->update('talk_rooms')
->set('active_since', 'activeSince')

2
lib/Migration/Version3003Date20180707222130.php

@ -24,8 +24,8 @@ declare(strict_types=1);
*/
namespace OCA\Talk\Migration;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

4
lib/Migration/Version3003Date20180718112436.php

@ -24,9 +24,9 @@ declare(strict_types=1);
*/
namespace OCA\Talk\Migration;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\DB\Types;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
@ -51,7 +51,7 @@ class Version3003Date20180718112436 extends SimpleMigrationStep {
$table = $schema->getTable('talk_rooms');
if (!$table->hasColumn('last_activity')) {
$table->addColumn('last_activity', Types::DATETIME_MUTABLE, [
$table->addColumn('last_activity', Types::DATETIME, [
'notnull' => false,
]);

2
lib/Migration/Version3003Date20180718133519.php

@ -22,8 +22,8 @@ declare(strict_types=1);
*/
namespace OCA\Talk\Migration;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version3003Date20180720162342.php

@ -24,8 +24,8 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version3003Date20180722152849.php

@ -24,8 +24,8 @@ declare(strict_types=1);
*/
namespace OCA\Talk\Migration;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

4
lib/Migration/Version3003Date20180730080327.php

@ -24,8 +24,8 @@ declare(strict_types=1);
*/
namespace OCA\Talk\Migration;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
@ -43,7 +43,7 @@ class Version3003Date20180730080327 extends SimpleMigrationStep {
$table = $schema->getTable('talk_participants');
if (!$table->hasColumn('last_mention')) {
$table->addColumn('last_mention', Types::DATETIME_MUTABLE, [
$table->addColumn('last_mention', Types::DATETIME, [
'notnull' => false,
]);
}

2
lib/Migration/Version4099Date20181001123058.php

@ -23,9 +23,9 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCA\Talk\Participant;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version5099Date20190121102337.php

@ -24,8 +24,8 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version5099Date20190319134820.php

@ -24,8 +24,8 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

4
lib/Migration/Version6099Date20190627172429.php

@ -24,8 +24,8 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
@ -49,7 +49,7 @@ class Version6099Date20190627172429 extends SimpleMigrationStep {
'length' => 6,
'default' => 0,
]);
$table->addColumn('lobby_timer', Types::DATETIME_MUTABLE, [
$table->addColumn('lobby_timer', Types::DATETIME, [
'notnull' => false,
]);
}

4
lib/Migration/Version7000Date20190717141457.php

@ -23,8 +23,8 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
@ -41,7 +41,7 @@ class Version7000Date20190717141457 extends SimpleMigrationStep {
$table = $schema->getTable('talk_participants');
if (!$table->hasColumn('last_joined_call')) {
$table->addColumn('last_joined_call', Types::DATETIME_MUTABLE, [
$table->addColumn('last_joined_call', Types::DATETIME, [
'notnull' => false,
]);
}

2
lib/Migration/Version7000Date20190724121136.php

@ -25,9 +25,9 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Doctrine\DBAL\Schema\SchemaException;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\DB\Types;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

2
lib/Migration/Version8000Date20200407115318.php

@ -26,8 +26,8 @@ declare(strict_types=1);
namespace OCA\Talk\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

3
psalm.xml

@ -31,8 +31,7 @@
<referencedClass name="Doctrine\DBAL\Exception\InvalidFieldNameException" />
<referencedClass name="Doctrine\DBAL\Exception\TableNotFoundException" />
<referencedClass name="Doctrine\DBAL\Exception\UniqueConstraintViolationException" />
<referencedClass name="Doctrine\DBAL\Platforms\PostgreSQL94Platform" />
<referencedClass name="Doctrine\DBAL\Types\Types" />
<referencedClass name="Doctrine\DBAL\Platforms\PostgreSQLPlatform" />
<referencedClass name="GuzzleHttp\Exception\ClientException" />
<referencedClass name="GuzzleHttp\Exception\ServerException" />
<referencedClass name="GuzzleHttp\Exception\ConnectException" />

Loading…
Cancel
Save