require at least Nextcloud 22

This commit is contained in:
korelstar 2022-03-19 20:57:17 +01:00
parent 7df2fa9de8
commit acffbd7b92
5 changed files with 10 additions and 8 deletions

View File

@ -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

View File

@ -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>

View File

@ -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",

View File

@ -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();
}
}

View File

@ -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' => [],