Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions apps/testing/lib/Locking/FakeDBLockingProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

use OC\Lock\DBLockingProvider;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
use Override;

class FakeDBLockingProvider extends DBLockingProvider {
// Lock for 10 hours just to be sure
Expand All @@ -28,14 +30,16 @@ public function __construct(
$this->db = $connection;
}

/** @inheritDoc */
#[Override]
public function releaseLock(string $path, int $type): void {
// we DONT keep shared locks till the end of the request
// we DON'T keep shared locks till the end of the request
if ($type === self::LOCK_SHARED) {
$this->db->executeUpdate(
'UPDATE `*PREFIX*file_locks` SET `lock` = 0 WHERE `key` = ? AND `lock` = 1',
[$path]
);
$qb = $this->db->getQueryBuilder();
$qb->update('file_locks')
->set('lock', $qb->createNamedParameter(0, IQueryBuilder::PARAM_INT))
->where($qb->expr()->eq('key', $qb->createNamedParameter($path, IQueryBuilder::PARAM_STR)))
->andWhere($qb->expr()->eq('lock', $qb->createNamedParameter(1, IQueryBuilder::PARAM_INT)))
->executeStatement();
}

parent::releaseLock($path, $type);
Expand Down
34 changes: 0 additions & 34 deletions build/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2132,11 +2132,6 @@
<code><![CDATA[setAppValue]]></code>
</DeprecatedMethod>
</file>
<file src="apps/testing/lib/Locking/FakeDBLockingProvider.php">
<DeprecatedMethod>
<code><![CDATA[executeUpdate]]></code>
</DeprecatedMethod>
</file>
<file src="apps/testing/lib/Provider/FakeText2ImageProvider.php">
<DeprecatedInterface>
<code><![CDATA[FakeText2ImageProvider]]></code>
Expand Down Expand Up @@ -2674,7 +2669,6 @@
</file>
<file src="core/Command/Db/ConvertType.php">
<DeprecatedMethod>
<code><![CDATA[execute]]></code>
<code><![CDATA[getName]]></code>
<code><![CDATA[getPrimaryKeyColumns]]></code>
</DeprecatedMethod>
Expand Down Expand Up @@ -3021,34 +3015,6 @@
<code><![CDATA[$this->request->server]]></code>
</NoInterfaceProperties>
</file>
<file src="core/Migrations/Version13000Date20170718121200.php">
<DeprecatedMethod>
<code><![CDATA[execute]]></code>
<code><![CDATA[execute]]></code>
<code><![CDATA[execute]]></code>
</DeprecatedMethod>
</file>
<file src="core/Migrations/Version14000Date20180404140050.php">
<DeprecatedMethod>
<code><![CDATA[execute]]></code>
</DeprecatedMethod>
</file>
<file src="core/Migrations/Version16000Date20190427105638.php">
<DeprecatedMethod>
<code><![CDATA[execute]]></code>
</DeprecatedMethod>
</file>
<file src="core/Migrations/Version18000Date20190920085628.php">
<DeprecatedMethod>
<code><![CDATA[execute]]></code>
</DeprecatedMethod>
</file>
<file src="core/Migrations/Version20000Date20201109081918.php">
<DeprecatedMethod>
<code><![CDATA[execute]]></code>
<code><![CDATA[execute]]></code>
</DeprecatedMethod>
</file>
<file src="core/Service/LoginFlowV2Service.php">
<DeprecatedClass>
<code><![CDATA[IToken::DO_NOT_REMEMBER]]></code>
Expand Down
2 changes: 1 addition & 1 deletion core/Command/Db/ConvertType.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ protected function copyTable(Connection $fromDB, Connection $toDB, Table $table,
$insertQuery->setParameter($key, $value);
}
}
$insertQuery->execute();
$insertQuery->executeStatement();
}
$result->closeCursor();

Expand Down
6 changes: 3 additions & 3 deletions core/Migrations/Version13000Date20170718121200.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array
if ($table->hasColumn('fileid')) {
$qb = $this->connection->getQueryBuilder();
$qb->delete('properties');
$qb->execute();
$qb->executeStatement();
}
}

Expand Down Expand Up @@ -1008,6 +1008,7 @@ public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array
$query = $this->connection->getQueryBuilder();
$query->select('*')
->from('dav_properties');
$result = $query->executeQuery();

$insert = $this->connection->getQueryBuilder();
$insert->insert('properties')
Expand All @@ -1016,14 +1017,13 @@ public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array
->setValue('propertyvalue', $insert->createParameter('propertyvalue'))
->setValue('userid', $insert->createParameter('userid'));

$result = $query->execute();
while ($row = $result->fetch()) {
preg_match('/(calendar)\/([A-z0-9-@_]+)\//', $row['propertypath'], $match);
$insert->setParameter('propertypath', (string)$row['propertypath'])
->setParameter('propertyname', (string)$row['propertyname'])
->setParameter('propertyvalue', (string)$row['propertyvalue'])
->setParameter('userid', ($match[2] ?? ''));
$insert->execute();
$insert->executeStatement();
}
}
}
2 changes: 1 addition & 1 deletion core/Migrations/Version14000Date20180404140050.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array

$qb->update('users')
->set('uid_lower', $qb->func()->lower('uid'));
$qb->execute();
$qb->executeStatement();
}
}
2 changes: 1 addition & 1 deletion core/Migrations/Version16000Date20190427105638.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $
$this->connection
->getQueryBuilder()
->delete('collres_accesscache')
->execute();
->executeStatement();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion core/Migrations/Version18000Date20190920085628.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array
$query = $this->connection->getQueryBuilder();
$query->update('groups')
->set('displayname', 'gid');
$query->execute();
$query->executeStatement();
}
}
4 changes: 2 additions & 2 deletions core/Migrations/Version20000Date20201109081918.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array
->setValue('identifier', $insert->createParameter('identifier'))
->setValue('credentials', $insert->createParameter('credentials'));

$result = $query->execute();
$result = $query->executeQuery();
while ($row = $result->fetch()) {
$insert->setParameter('user', (string)$row['user'])
->setParameter('identifier', (string)$row['identifier'])
->setParameter('credentials', (string)$row['credentials']);
$insert->execute();
$insert->executeStatement();
}
$result->closeCursor();
}
Expand Down
Loading