diff options
author | korelstar <korelstar@users.noreply.github.com> | 2022-03-19 22:57:17 +0300 |
---|---|---|
committer | korelstar <korelstar@users.noreply.github.com> | 2022-03-19 23:30:11 +0300 |
commit | acffbd7b92b5cd6d1b23e4b5e39cfa5c18e8a830 (patch) | |
tree | 3c784732439c0a1bd18cbe1bb76fd9c97d4b752c | |
parent | 7df2fa9de8876a0aa9961ad0e745090acb2497a5 (diff) |
require at least Nextcloud 22
-rw-r--r-- | .github/workflows/lint.yml | 2 | ||||
-rw-r--r-- | appinfo/info.xml | 2 | ||||
-rw-r--r-- | composer.json | 2 | ||||
-rw-r--r-- | lib/Db/MetaMapper.php | 6 | ||||
-rw-r--r-- | lib/Service/NotesService.php | 6 |
5 files changed, 10 insertions, 8 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bd453eaa..8fde2958 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -65,7 +65,7 @@ jobs: php-version: ${{ env.PHP_VERSION }} - name: Determine minimum Nextcloud API version if: matrix.version == 'min' - run: echo "NC_API_TAG=$(php tests/nextcloud-version.php --appinfo)" >> $GITHUB_ENV + run: echo "NC_API_TAG=^$(php tests/nextcloud-version.php --appinfo)" >> $GITHUB_ENV - name: Install Dependencies run: | composer require --dev christophwurst/nextcloud:$NC_API_TAG diff --git a/appinfo/info.xml b/appinfo/info.xml index 174628b7..11a03be8 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -23,7 +23,7 @@ The Notes app is a distraction free notes taking app for [Nextcloud](https://www <screenshot small-thumbnail="https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes-thumbnail.jpg">https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes.png</screenshot> <dependencies> <php min-version="7.3" max-version="8.1" /> - <nextcloud min-version="20" max-version="24" /> + <nextcloud min-version="22" max-version="25" /> </dependencies> <repair-steps> <post-migration> diff --git a/composer.json b/composer.json index 3fabfbed..53500bdb 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "require-dev": { - "christophwurst/nextcloud": ">=20", + "christophwurst/nextcloud": ">=22", "nextcloud/coding-standard": "^1.0", "friendsofphp/php-cs-fixer": "^3", "squizlabs/php_codesniffer": "^3", diff --git a/lib/Db/MetaMapper.php b/lib/Db/MetaMapper.php index e0d91c72..bbbb82e4 100644 --- a/lib/Db/MetaMapper.php +++ b/lib/Db/MetaMapper.php @@ -37,17 +37,15 @@ class MetaMapper extends QBMapper { public function deleteAll() : void { $qb = $this->db->getQueryBuilder(); - // TODO NC22: replace execute() with executeStatement() - $qb->delete($this->tableName)->execute(); + $qb->delete($this->tableName)->executeStatement(); } public function deleteByNote(int $id) : void { $qb = $this->db->getQueryBuilder(); - // TODO NC22: replace execute() with executeStatement() $qb->delete($this->tableName) ->where( $qb->expr()->eq('file_id', $qb->createNamedParameter($id, IQueryBuilder::PARAM_INT)) ) - ->execute(); + ->executeStatement(); } } diff --git a/lib/Service/NotesService.php b/lib/Service/NotesService.php index 4f43de27..c4b7694c 100644 --- a/lib/Service/NotesService.php +++ b/lib/Service/NotesService.php @@ -152,7 +152,11 @@ class NotesService { /** * gather note files in given directory and all subdirectories */ - private static function gatherNoteFiles(string $customExtension, Folder $folder, string $categoryPrefix = '') : array { + private static function gatherNoteFiles( + string $customExtension, + Folder $folder, + string $categoryPrefix = '' + ) : array { $data = [ 'files' => [], 'categories' => [], |