Skip to content

Commit

Permalink
Support NC 30
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Jul 29, 2024
1 parent cedf6fb commit c0ec38d
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
fail-fast: false
matrix:
php-versions: ['8.2']
server-versions: ['master', 'stable29']
server-versions: ['master']

services:
postgres:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
strategy:
matrix:
php-versions: [ '8.1', '8.2', '8.3' ]
server-versions: [ 'dev-master', 'dev-stable29' ]
server-versions: [ 'dev-master' ]
fail-fast: false

name: Nextcloud
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source_dir=$(build_dir)/source
sign_dir=$(build_dir)/sign
package_name=$(app_name)
cert_dir=$(HOME)/.nextcloud/certificates
version+=7.1.0
version+=8.0.0

all: dev-setup build-js-production

Expand Down
4 changes: 2 additions & 2 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Requirements:
The app does not send any sensitive data to cloud providers or similar services. All processing is done on your Nextcloud machine, using Tensorflow.js running in Node.js.
]]></description>
<version>7.1.0</version>
<version>8.0.0</version>
<licence>agpl</licence>
<author mail="[email protected]">Marcel Klehr</author>
<types>
Expand All @@ -92,7 +92,7 @@ The app does not send any sensitive data to cloud providers or similar services.
<screenshot>https://raw.githubusercontent.com/nextcloud/recognize/main/screenshots/Logo.png</screenshot>
<screenshot>https://raw.githubusercontent.com/nextcloud/recognize/main/screenshots/imagenet_examples.jpg</screenshot>
<dependencies>
<nextcloud min-version="29" max-version="30" />
<nextcloud min-version="30" max-version="30" />
</dependencies>

<repair-steps>
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/IgnoreService.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function getIgnoredDirectories(int $storageId, array $ignoreMarkers): arr
return $directories;
}

$qb = new CacheQueryBuilder($this->db, $this->systemConfig, $this->logger, $this->metadataManager);
$qb = new CacheQueryBuilder($this->db->getQueryBuilder(), $this->metadataManager);

Check failure on line 48 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-master)

MixedAssignment

lib/Service/IgnoreService.php:48:3: MixedAssignment: Unable to determine the type that $qb is being assigned to (see https://psalm.dev/032)

Check failure on line 48 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-master)

UndefinedClass

lib/Service/IgnoreService.php:48:13: UndefinedClass: Class, interface or enum named OC\Files\Cache\CacheQueryBuilder does not exist (see https://psalm.dev/019)

Check failure on line 48 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.2, dev-master)

MixedAssignment

lib/Service/IgnoreService.php:48:3: MixedAssignment: Unable to determine the type that $qb is being assigned to (see https://psalm.dev/032)

Check failure on line 48 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.2, dev-master)

UndefinedClass

lib/Service/IgnoreService.php:48:13: UndefinedClass: Class, interface or enum named OC\Files\Cache\CacheQueryBuilder does not exist (see https://psalm.dev/019)

Check failure on line 48 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.3, dev-master)

MixedAssignment

lib/Service/IgnoreService.php:48:3: MixedAssignment: Unable to determine the type that $qb is being assigned to (see https://psalm.dev/032)

Check failure on line 48 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.3, dev-master)

UndefinedClass

lib/Service/IgnoreService.php:48:13: UndefinedClass: Class, interface or enum named OC\Files\Cache\CacheQueryBuilder does not exist (see https://psalm.dev/019)
$result = $qb->selectFileCache()

Check failure on line 49 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-master)

MixedAssignment

lib/Service/IgnoreService.php:49:3: MixedAssignment: Unable to determine the type that $result is being assigned to (see https://psalm.dev/032)

Check failure on line 49 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:49:18: MixedMethodCall: Cannot determine the type of $qb when calling method selectFileCache (see https://psalm.dev/015)

Check failure on line 49 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.2, dev-master)

MixedAssignment

lib/Service/IgnoreService.php:49:3: MixedAssignment: Unable to determine the type that $result is being assigned to (see https://psalm.dev/032)

Check failure on line 49 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.2, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:49:18: MixedMethodCall: Cannot determine the type of $qb when calling method selectFileCache (see https://psalm.dev/015)

Check failure on line 49 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.3, dev-master)

MixedAssignment

lib/Service/IgnoreService.php:49:3: MixedAssignment: Unable to determine the type that $result is being assigned to (see https://psalm.dev/032)

Check failure on line 49 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.3, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:49:18: MixedMethodCall: Cannot determine the type of $qb when calling method selectFileCache (see https://psalm.dev/015)
->andWhere($qb->expr()->in('name', $qb->createNamedParameter($ignoreMarkers, IQueryBuilder::PARAM_STR_ARRAY)))

Check failure on line 50 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:50:6: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)

Check failure on line 50 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:50:20: MixedMethodCall: Cannot determine the type of $qb when calling method expr (see https://psalm.dev/015)

Check failure on line 50 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:50:28: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)

Check failure on line 50 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:50:44: MixedMethodCall: Cannot determine the type of $qb when calling method createNamedParameter (see https://psalm.dev/015)

Check failure on line 50 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.2, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:50:6: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)

Check failure on line 50 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.2, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:50:20: MixedMethodCall: Cannot determine the type of $qb when calling method expr (see https://psalm.dev/015)

Check failure on line 50 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.2, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:50:28: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)

Check failure on line 50 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.2, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:50:44: MixedMethodCall: Cannot determine the type of $qb when calling method createNamedParameter (see https://psalm.dev/015)

Check failure on line 50 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.3, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:50:6: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)

Check failure on line 50 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.3, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:50:20: MixedMethodCall: Cannot determine the type of $qb when calling method expr (see https://psalm.dev/015)

Check failure on line 50 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.3, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:50:28: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)

Check failure on line 50 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.3, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:50:44: MixedMethodCall: Cannot determine the type of $qb when calling method createNamedParameter (see https://psalm.dev/015)
->andWhere($qb->expr()->eq('storage', $qb->createNamedParameter($storageId, IQueryBuilder::PARAM_INT)))

Check failure on line 51 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:51:6: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)

Check failure on line 51 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:51:20: MixedMethodCall: Cannot determine the type of $qb when calling method expr (see https://psalm.dev/015)

Check failure on line 51 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.2, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:51:6: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)

Check failure on line 51 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.2, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:51:20: MixedMethodCall: Cannot determine the type of $qb when calling method expr (see https://psalm.dev/015)

Check failure on line 51 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.3, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:51:6: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)

Check failure on line 51 in lib/Service/IgnoreService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.3, dev-master)

MixedMethodCall

lib/Service/IgnoreService.php:51:20: MixedMethodCall: Cannot determine the type of $qb when calling method expr (see https://psalm.dev/015)
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/StorageService.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function getMounts(): \Generator {
$overrideRoot = $rootId;
if (in_array($row['mount_provider_class'], self::HOME_MOUNT_TYPES)) {
// Only crawl files, not cache or trashbin
$qb = new CacheQueryBuilder($this->db, $this->systemConfig, $this->logger, $this->metadataManager);
$qb = new CacheQueryBuilder($this->db->getQueryBuilder(), $this->metadataManager);
try {
$res = $qb->selectFileCache()
->andWhere($qb->expr()->eq('filecache.storage', $qb->createNamedParameter($storageId, IQueryBuilder::PARAM_INT)))
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "recognize",
"version": "7.1.0",
"version": "8.0.0",
"description": "Image recognition in nextcloud",
"main": "src/classifier_imagenet.js",
"directories": {
Expand Down
17 changes: 0 additions & 17 deletions tests/stub.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,6 @@ namespace OC {
}


namespace OC\Files\Cache {

use OCP\FilesMetadata\IFilesMetadataManager;
use OCP\IDBConnection;
use Psr\Log\LoggerInterface;

class CacheQueryBuilder extends \OCP\DB\QueryBuilder\IQueryBuilder {
public function __construct(\OCP\IDBCOnnection $db, \OC\SystemConfig $config, \Psr\Log\LoggerInterface $logger, \OCP\FilesMetadata\IFilesMetadataManager $filesMetadataManager);
public function selectFileCache(string $alias = null, bool $joinExtendedCache = true):CacheQueryBuilder;
public function whereStorageId(int $storageId):CacheQueryBuilder;
public function whereFileId(int $fileId):CacheQueryBuilder;
public function wherePath(string $path):CacheQueryBuilder;
public function whereParent(int $parent):CacheQueryBuilder;
public function whereParentInParameter(string $parameter):CacheQueryBuilder;
}
}

namespace Doctrine\DBAL {
final class ParameterType
{
Expand Down

0 comments on commit c0ec38d

Please sign in to comment.