Compare commits

..

66 Commits

Author SHA1 Message Date
github-actions[bot]
d9d75fdfe4 Merge pull request #6284 from nextcloud/automated/noid/main-update-nextcloud-ocp
[main] Update nextcloud/ocp dependency
2024-09-01 04:57:53 +00:00
nextcloud-command
c348b824c8 chore(dev-deps): Bump nextcloud/ocp package
Signed-off-by: GitHub <noreply@github.com>
2024-09-01 03:02:56 +00:00
Nextcloud bot
39987a0303 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-09-01 00:41:40 +00:00
dependabot[bot]
0906b06192 Merge pull request #6270 from nextcloud/dependabot/npm_and_yarn/main/cypress-13.14.1 2024-08-31 03:38:18 +00:00
dependabot[bot]
434f59d06d Chore(deps-dev): Bump cypress from 13.13.3 to 13.14.1
Bumps [cypress](https://github.com/cypress-io/cypress) from 13.13.3 to 13.14.1.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v13.13.3...v13.14.1)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-31 02:56:18 +00:00
dependabot[bot]
af4c01abd4 Merge pull request #6268 from nextcloud/dependabot/npm_and_yarn/main/babel/runtime-7.25.6 2024-08-31 02:55:55 +00:00
dependabot[bot]
516bc6d5fc Merge pull request #6269 from nextcloud/dependabot/npm_and_yarn/main/nextcloud/vue-8.17.1 2024-08-31 02:55:38 +00:00
dependabot[bot]
d7b3aedab4 Merge pull request #6267 from nextcloud/dependabot/npm_and_yarn/main/relative-ci/agent-4.2.11 2024-08-31 02:55:26 +00:00
dependabot[bot]
fb641946d6 Chore(deps): Bump @nextcloud/vue from 8.17.0 to 8.17.1
Bumps [@nextcloud/vue](https://github.com/nextcloud-libraries/nextcloud-vue) from 8.17.0 to 8.17.1.
- [Release notes](https://github.com/nextcloud-libraries/nextcloud-vue/releases)
- [Changelog](https://github.com/nextcloud-libraries/nextcloud-vue/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nextcloud-libraries/nextcloud-vue/compare/v8.17.0...v8.17.1)

---
updated-dependencies:
- dependency-name: "@nextcloud/vue"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-31 01:39:08 +00:00
dependabot[bot]
b3bc532e81 Chore(deps): Bump @babel/runtime from 7.25.4 to 7.25.6
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.25.4 to 7.25.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.25.6/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-31 01:38:48 +00:00
dependabot[bot]
fe1006d643 Chore(deps-dev): Bump @relative-ci/agent from 4.2.10 to 4.2.11
Bumps [@relative-ci/agent](https://github.com/relative-ci/agent) from 4.2.10 to 4.2.11.
- [Release notes](https://github.com/relative-ci/agent/releases)
- [Commits](https://github.com/relative-ci/agent/compare/v4.2.10...v4.2.11)

---
updated-dependencies:
- dependency-name: "@relative-ci/agent"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-31 01:38:32 +00:00
Julius Härtl
9a37d6dbfc Merge pull request #6266 from nextcloud/dependabot/npm_and_yarn/webpack-5.94.0 2024-08-30 20:15:19 +02:00
dependabot[bot]
bf704309ad Chore(deps-dev): Bump webpack from 5.88.2 to 5.94.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.88.2 to 5.94.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.88.2...v5.94.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-30 17:49:09 +00:00
Nextcloud bot
635cf3962f Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-08-30 00:56:02 +00:00
Julius Härtl
43a0fec9a6 Merge pull request #6257 from nextcloud/fix/no-cross-referencing-in-labels
copy labels when moving cards between boards
2024-08-29 12:30:17 +02:00
Julius Härtl
c6c41c59d2 Merge pull request #6232 from nextcloud/fix/nextcloud-30-design-issues
fix: 30 design issues
2024-08-29 12:28:53 +02:00
Julius Härtl
fb54b8126a fix: Avoid duplicate scrollbars
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-08-29 11:36:23 +02:00
Luka Trovic
a4f2a99776 fix: 30 design issues
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2024-08-29 11:19:30 +02:00
grnd-alt
dbca6bc0d7 copy labels when moving cards between boards
Signed-off-by: grnd-alt <salimbelakkaf@outlook.de>
2024-08-28 11:59:34 +02:00
Nextcloud bot
e647faf31c Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-08-28 00:41:42 +00:00
Julius Härtl
fdd05853af Merge pull request #6260 from nextcloud/Jerome-Herbinet-translation-call-fix
Translation call fix
2024-08-26 13:19:55 +02:00
Jérôme Herbinet
afd8372baa Translation call fix
Signed-off-by: Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com>
2024-08-26 13:12:35 +02:00
Julius Härtl
f99d1f516c Merge pull request #6259 from Dinock/patch-1
Fixed a typo in Markdown.md
2024-08-26 13:01:54 +02:00
Dinock
1aa23407f1 Update Markdown.md
Fixed a typo in the sentence "Markdown comes in may flavors.". (old="may", new="many")

Signed-off-by: Dinock <54438803+Dinock@users.noreply.github.com>
2024-08-26 12:44:19 +02:00
Julius Härtl
83d59dd3a9 Merge pull request #6235 from nextcloud/fix/ui
Fix UI with the new compact design
2024-08-26 12:43:24 +02:00
dependabot[bot]
2233786605 Merge pull request #6236 from nextcloud/dependabot/composer/nextcloud/coding-standard-1.2.3 2024-08-26 06:21:33 +00:00
Julius Härtl
2d2f7c6772 Merge pull request #6240 from nextcloud/dependabot/github_actions/mdecoleman/pr-branch-name-3.0.0
Chore(deps): Bump mdecoleman/pr-branch-name from 2.0.0 to 3.0.0
2024-08-26 08:15:21 +02:00
dependabot[bot]
ba3e97b73d Chore(deps-dev): Bump nextcloud/coding-standard from 1.2.1 to 1.2.3
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 1.2.1 to 1.2.3.
- [Release notes](https://github.com/nextcloud/coding-standard/releases)
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nextcloud/coding-standard/compare/v1.2.1...v1.2.3)

---
updated-dependencies:
- dependency-name: nextcloud/coding-standard
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 08:14:42 +02:00
Julius Härtl
4107481b07 Merge pull request #6237 from nextcloud/dependabot/npm_and_yarn/main/chroma-js-3.0.0
Chore(deps): Bump chroma-js from 2.6.0 to 3.0.0
2024-08-26 08:11:37 +02:00
Julius Härtl
6e158992dc Merge pull request #6253 from nextcloud/automated/noid/main-fix-npm-audit
[main] Fix npm audit
2024-08-26 08:11:18 +02:00
nextcloud-command
0e4c60c23f fix(deps): Fix npm audit
Signed-off-by: GitHub <noreply@github.com>
2024-08-25 03:08:35 +00:00
dependabot[bot]
702672de28 Chore(deps): Bump chroma-js from 2.6.0 to 3.0.0
Bumps [chroma-js](https://github.com/gka/chroma.js) from 2.6.0 to 3.0.0.
- [Release notes](https://github.com/gka/chroma.js/releases)
- [Changelog](https://github.com/gka/chroma.js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gka/chroma.js/compare/v2.6.0...v3.0.0)

---
updated-dependencies:
- dependency-name: chroma-js
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-24 08:12:19 +00:00
Julius Härtl
48bdf83887 Merge pull request #6238 from nextcloud/dependabot/npm_and_yarn/main/nextcloud/vue-8.17.0 2024-08-24 10:11:32 +02:00
dependabot[bot]
520a0f8c26 Merge pull request #6239 from nextcloud/dependabot/npm_and_yarn/main/babel/runtime-7.25.4 2024-08-24 02:16:38 +00:00
dependabot[bot]
b84564b0f7 Chore(deps): Bump mdecoleman/pr-branch-name from 2.0.0 to 3.0.0
Bumps [mdecoleman/pr-branch-name](https://github.com/mdecoleman/pr-branch-name) from 2.0.0 to 3.0.0.
- [Release notes](https://github.com/mdecoleman/pr-branch-name/releases)
- [Commits](bab4c71506...55795d86b4)

---
updated-dependencies:
- dependency-name: mdecoleman/pr-branch-name
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-24 01:19:34 +00:00
dependabot[bot]
ba33a83e9f Chore(deps): Bump @babel/runtime from 7.25.0 to 7.25.4
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.25.0 to 7.25.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.25.4/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-24 01:11:07 +00:00
dependabot[bot]
b645c1e974 Chore(deps): Bump @nextcloud/vue from 8.16.0 to 8.17.0
Bumps [@nextcloud/vue](https://github.com/nextcloud-libraries/nextcloud-vue) from 8.16.0 to 8.17.0.
- [Release notes](https://github.com/nextcloud-libraries/nextcloud-vue/releases)
- [Changelog](https://github.com/nextcloud-libraries/nextcloud-vue/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nextcloud-libraries/nextcloud-vue/compare/v8.16.0...v8.17.0)

---
updated-dependencies:
- dependency-name: "@nextcloud/vue"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-24 01:10:48 +00:00
Nextcloud bot
3daad1b9bc Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-08-24 00:38:58 +00:00
Julius Härtl
5416a2b3a1 fix: Adjust UI to be more consistent with new Nextcloud compact UI
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-08-23 20:13:09 +02:00
Julius Härtl
5c3098afa1 fix: Hide inline search box as the global one is working now
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-08-23 20:11:48 +02:00
Julius Härtl
e25470ece3 Merge pull request #6234 from nextcloud/automated/update-workflows/default 2024-08-23 09:26:53 +02:00
skjnldsv
87a65e9b0f chore: update workflows from templates
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-08-22 22:10:01 +02:00
Nextcloud bot
4c9459ac57 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-08-22 00:38:04 +00:00
Julius Härtl
67bd5dcb1f Merge pull request #6230 from nextcloud/refactor/migrate-away-from-ILogger
refactor: Migrate away from deprecated `ILogger` interface to PSR-3
2024-08-19 15:12:20 +02:00
Ferdinand Thiessen
beb563e74e refactor: Migrate away from deprecated ILogger interface to PSR-3
Mostly replace `ILogger` with `LoggerInterface` and some minor cleanup (constructor property promotion).
Some places used the deprecated `logException` this is easy to migrate by simply use the appropriate loglevel on the logger
and place the exception under the `exception` key in the context.
Also the manual checking of the configured log level is not needed, as this is already done by the logger.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-19 14:09:13 +02:00
Arthur Schiwon
3e1805b09b Merge pull request #6229 from nextcloud/fix/appinfo
fix: Reorder `info.xml` entries to make it valid
2024-08-19 13:49:31 +02:00
Ferdinand Thiessen
ee568ec307 fix: Reorder info.xml entries to make it valid
The order of the entries is fixed in the `info.xsd`,
so to make it validate correctly we need to reorder some attributes (`namespace` and `types`).

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-19 13:33:24 +02:00
Julius Härtl
37b355b530 Merge pull request #6218 from nextcloud/dependabot/npm_and_yarn/main/nextcloud/dialogs-6.0.0
Chore(deps): Bump @nextcloud/dialogs from 5.3.5 to 6.0.0
2024-08-19 09:18:48 +02:00
github-actions[bot]
a5de97ff42 Merge pull request #6225 from nextcloud/automated/noid/main-update-nextcloud-ocp
[main] Update nextcloud/ocp dependency
2024-08-18 04:34:02 +00:00
nextcloud-command
3f4cdf7293 chore(dev-deps): Bump nextcloud/ocp package
Signed-off-by: GitHub <noreply@github.com>
2024-08-18 02:41:46 +00:00
dependabot[bot]
2a35b627a0 Merge pull request #6217 from nextcloud/dependabot/npm_and_yarn/main/cypress-13.13.3 2024-08-17 02:45:00 +00:00
dependabot[bot]
517347533d Chore(deps): Bump @nextcloud/dialogs from 5.3.5 to 6.0.0
Bumps [@nextcloud/dialogs](https://github.com/nextcloud-libraries/nextcloud-dialogs) from 5.3.5 to 6.0.0.
- [Release notes](https://github.com/nextcloud-libraries/nextcloud-dialogs/releases)
- [Changelog](https://github.com/nextcloud-libraries/nextcloud-dialogs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nextcloud-libraries/nextcloud-dialogs/compare/v5.3.5...v6.0.0)

---
updated-dependencies:
- dependency-name: "@nextcloud/dialogs"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-17 01:06:11 +00:00
dependabot[bot]
f0d021560a Chore(deps-dev): Bump cypress from 13.13.2 to 13.13.3
Bumps [cypress](https://github.com/cypress-io/cypress) from 13.13.2 to 13.13.3.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v13.13.2...v13.13.3)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-17 01:05:51 +00:00
dependabot[bot]
d49093f6b6 Merge pull request #6216 from nextcloud/dependabot/npm_and_yarn/elliptic-6.5.7 2024-08-16 18:22:43 +00:00
dependabot[bot]
1c2f3683a5 Merge pull request #6155 from nextcloud/dependabot/npm_and_yarn/main/babel/runtime-7.25.0 2024-08-16 18:22:40 +00:00
dependabot[bot]
bd0f8fb4c4 Chore(deps-dev): Bump elliptic from 6.5.4 to 6.5.7
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.4 to 6.5.7.
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.4...v6.5.7)

---
updated-dependencies:
- dependency-name: elliptic
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 18:11:13 +00:00
dependabot[bot]
061a04142b Chore(deps): Bump @babel/runtime from 7.24.8 to 7.25.0
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.24.8 to 7.25.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.25.0/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 18:11:05 +00:00
dependabot[bot]
092af73794 Merge pull request #6215 from nextcloud/dependabot/npm_and_yarn/main/eslint-plugin-cypress-3.5.0 2024-08-16 18:10:17 +00:00
dependabot[bot]
0f3359e417 Chore(deps-dev): Bump eslint-plugin-cypress from 3.3.0 to 3.5.0
Bumps [eslint-plugin-cypress](https://github.com/cypress-io/eslint-plugin-cypress) from 3.3.0 to 3.5.0.
- [Release notes](https://github.com/cypress-io/eslint-plugin-cypress/releases)
- [Commits](https://github.com/cypress-io/eslint-plugin-cypress/compare/v3.3.0...v3.5.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 18:04:41 +00:00
Nextcloud bot
90272cdc12 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-08-15 00:45:52 +00:00
dependabot[bot]
7891f017c9 Merge pull request #6212 from nextcloud/dependabot/npm_and_yarn/main/nextcloud/auth-2.4.0 2024-08-14 15:12:04 +00:00
dependabot[bot]
cb5b67ed09 Merge pull request #6209 from nextcloud/dependabot/npm_and_yarn/axios-1.7.4 2024-08-14 15:08:07 +00:00
dependabot[bot]
201c121e34 Chore(deps): Bump @nextcloud/auth from 2.3.0 to 2.4.0
Bumps [@nextcloud/auth](https://github.com/nextcloud/nextcloud-auth) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/nextcloud/nextcloud-auth/releases)
- [Changelog](https://github.com/nextcloud-libraries/nextcloud-auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nextcloud/nextcloud-auth/compare/v2.3.0...v2.4.0)

---
updated-dependencies:
- dependency-name: "@nextcloud/auth"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-14 14:43:05 +00:00
dependabot[bot]
a1ea3b772b Chore(deps): Bump axios from 1.6.8 to 1.7.4
Bumps [axios](https://github.com/axios/axios) from 1.6.8 to 1.7.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.8...v1.7.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-14 14:42:55 +00:00
Julius Härtl
4d6a05915c Merge pull request #6206 from nextcloud/update-main-version
feat(deps): Add Nextcloud 31 support on main
2024-08-14 16:42:18 +02:00
Joas Schilling
0c5b4b0ebe feat(deps): Add Nextcloud 31 support on main
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-08-14 12:47:42 +02:00
62 changed files with 436 additions and 471 deletions

View File

@@ -13,6 +13,23 @@ updates:
- juliushaertl - juliushaertl
- luka-nextcloud - luka-nextcloud
- package-ecosystem: npm
target-branch: stable30
versioning-strategy: lockfile-only
directory: "/"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
open-pull-requests-limit: 30
labels:
- 3. to review
- dependencies
- package-ecosystem: npm - package-ecosystem: npm
target-branch: stable29 target-branch: stable29
versioning-strategy: lockfile-only versioning-strategy: lockfile-only
@@ -47,23 +64,6 @@ updates:
- 3. to review - 3. to review
- dependencies - dependencies
- package-ecosystem: npm
target-branch: stable27
versioning-strategy: lockfile-only
directory: "/"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
open-pull-requests-limit: 30
labels:
- 3. to review
- dependencies
- package-ecosystem: composer - package-ecosystem: composer
directory: "/" directory: "/"
schedule: schedule:

View File

@@ -22,7 +22,7 @@ jobs:
node-version: [20.x] node-version: [20.x]
# containers: [1, 2, 3] # containers: [1, 2, 3]
php-versions: [ '8.2' ] php-versions: [ '8.2' ]
server-versions: [ 'stable30' ] server-versions: [ 'master' ]
env: env:
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, apcu extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, apcu

View File

@@ -28,7 +28,7 @@ jobs:
matrix: matrix:
php-versions: ['8.1'] php-versions: ['8.1']
databases: ['sqlite', 'mysql', 'pgsql'] databases: ['sqlite', 'mysql', 'pgsql']
server-versions: ['stable30'] server-versions: ['master']
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }} name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}

View File

@@ -21,7 +21,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
branches: ['main', 'master', 'stable29', 'stable28', 'stable27'] branches: ['main', 'master', 'stable30', 'stable29', 'stable28']
name: npm-audit-fix-${{ matrix.branches }} name: npm-audit-fix-${{ matrix.branches }}

View File

@@ -20,7 +20,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
branches: ['main', 'master', 'stable29', 'stable28', 'stable27'] branches: ['main', 'master', 'stable30', 'stable29', 'stable28']
name: update-nextcloud-ocp-${{ matrix.branches }} name: update-nextcloud-ocp-${{ matrix.branches }}

View File

@@ -20,17 +20,17 @@
- 🚀 Get your project organized - 🚀 Get your project organized
</description> </description>
<version>1.14.0-beta.1</version> <version>2.0.0-dev.0</version>
<licence>agpl</licence> <licence>agpl</licence>
<author>Julius Härtl</author> <author>Julius Härtl</author>
<documentation>
<user>https://deck.readthedocs.io/en/latest/User_documentation_en/</user>
<developer>https://deck.readthedocs.io/en/latest/API/</developer>
</documentation>
<namespace>Deck</namespace> <namespace>Deck</namespace>
<types> <types>
<dav/> <dav/>
</types> </types>
<documentation>
<user>https://deck.readthedocs.io/en/latest/User_documentation_en/</user>
<developer>https://deck.readthedocs.io/en/latest/API/</developer>
</documentation>
<category>organization</category> <category>organization</category>
<category>office</category> <category>office</category>
<website>https://github.com/nextcloud/deck</website> <website>https://github.com/nextcloud/deck</website>
@@ -42,7 +42,7 @@
<database min-version="9.4">pgsql</database> <database min-version="9.4">pgsql</database>
<database>sqlite</database> <database>sqlite</database>
<database min-version="8.0">mysql</database> <database min-version="8.0">mysql</database>
<nextcloud min-version="30" max-version="30"/> <nextcloud min-version="31" max-version="31"/>
</dependencies> </dependencies>
<background-jobs> <background-jobs>
<job>OCA\Deck\Cron\DeleteCron</job> <job>OCA\Deck\Cron\DeleteCron</job>

View File

@@ -15,7 +15,7 @@
"roave/security-advisories": "dev-master", "roave/security-advisories": "dev-master",
"phpunit/phpunit": "^9", "phpunit/phpunit": "^9",
"nextcloud/coding-standard": "^1.1", "nextcloud/coding-standard": "^1.1",
"nextcloud/ocp": "dev-stable30", "nextcloud/ocp": "dev-master",
"psalm/phar": "^5.13" "psalm/phar": "^5.13"
}, },
"config": { "config": {

41
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "7242ec950e99240a95e6b6d877fdd8d2", "content-hash": "ee1c5b69795943e43d6277064d284ae0",
"packages": [ "packages": [
{ {
"name": "icecave/parity", "name": "icecave/parity",
@@ -399,16 +399,16 @@
}, },
{ {
"name": "nextcloud/coding-standard", "name": "nextcloud/coding-standard",
"version": "v1.2.1", "version": "v1.2.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nextcloud/coding-standard.git", "url": "https://github.com/nextcloud/coding-standard.git",
"reference": "cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e" "reference": "bc9c53a5306114b60c4363057aff9c2ed10a54da"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e", "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/bc9c53a5306114b60c4363057aff9c2ed10a54da",
"reference": "cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e", "reference": "bc9c53a5306114b60c4363057aff9c2ed10a54da",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -434,22 +434,22 @@
"description": "Nextcloud coding standards for the php cs fixer", "description": "Nextcloud coding standards for the php cs fixer",
"support": { "support": {
"issues": "https://github.com/nextcloud/coding-standard/issues", "issues": "https://github.com/nextcloud/coding-standard/issues",
"source": "https://github.com/nextcloud/coding-standard/tree/v1.2.1" "source": "https://github.com/nextcloud/coding-standard/tree/v1.2.3"
}, },
"time": "2024-02-01T14:54:37+00:00" "time": "2024-08-23T14:32:32+00:00"
}, },
{ {
"name": "nextcloud/ocp", "name": "nextcloud/ocp",
"version": "dev-stable30", "version": "dev-master",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nextcloud-deps/ocp.git", "url": "https://github.com/nextcloud-deps/ocp.git",
"reference": "2a005250064759f206aa1b5a1ee000dcd808ef5b" "reference": "b6538d7f14472c2ef6182c51df6be34cae033099"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/2a005250064759f206aa1b5a1ee000dcd808ef5b", "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/b6538d7f14472c2ef6182c51df6be34cae033099",
"reference": "2a005250064759f206aa1b5a1ee000dcd808ef5b", "reference": "b6538d7f14472c2ef6182c51df6be34cae033099",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -459,10 +459,11 @@
"psr/event-dispatcher": "^1.0", "psr/event-dispatcher": "^1.0",
"psr/log": "^1.1.4" "psr/log": "^1.1.4"
}, },
"default-branch": true,
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-stable30": "30.0.0-dev" "dev-master": "31.0.0-dev"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@@ -478,9 +479,9 @@
"description": "Composer package containing Nextcloud's public API (classes, interfaces)", "description": "Composer package containing Nextcloud's public API (classes, interfaces)",
"support": { "support": {
"issues": "https://github.com/nextcloud-deps/ocp/issues", "issues": "https://github.com/nextcloud-deps/ocp/issues",
"source": "https://github.com/nextcloud-deps/ocp/tree/stable30" "source": "https://github.com/nextcloud-deps/ocp/tree/master"
}, },
"time": "2024-08-14T08:51:38+00:00" "time": "2024-08-31T00:39:40+00:00"
}, },
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
@@ -660,16 +661,16 @@
}, },
{ {
"name": "php-cs-fixer/shim", "name": "php-cs-fixer/shim",
"version": "v3.49.0", "version": "v3.62.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHP-CS-Fixer/shim.git", "url": "https://github.com/PHP-CS-Fixer/shim.git",
"reference": "f7d3219cac46632f12362c9aa7c2ac0d2fe92c52" "reference": "7a91d5ce45c486f5b445d95901228507a02f60ae"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/f7d3219cac46632f12362c9aa7c2ac0d2fe92c52", "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/7a91d5ce45c486f5b445d95901228507a02f60ae",
"reference": "f7d3219cac46632f12362c9aa7c2ac0d2fe92c52", "reference": "7a91d5ce45c486f5b445d95901228507a02f60ae",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -706,9 +707,9 @@
"description": "A tool to automatically fix PHP code style", "description": "A tool to automatically fix PHP code style",
"support": { "support": {
"issues": "https://github.com/PHP-CS-Fixer/shim/issues", "issues": "https://github.com/PHP-CS-Fixer/shim/issues",
"source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.49.0" "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.62.0"
}, },
"time": "2024-02-02T00:42:09+00:00" "time": "2024-08-07T17:03:46+00:00"
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",

View File

@@ -13,7 +13,7 @@ The Deck application plugin uses the [markdown-it](https://github.com/markdown-i
## Supported Markdown ## Supported Markdown
Markdown comes in may flavors. The best way to learn markdown and understand how to use it, is simply to [try it](https://markdown-it.github.io) on the original script official playground. Markdown comes in many flavors. The best way to learn markdown and understand how to use it, is simply to [try it](https://markdown-it.github.io) on the original script official playground.
That same link offers also a comprehensive list of what is supported, and what is not - rendering it unnecessary to duplicate that content in here. That same link offers also a comprehensive list of what is supported, and what is not - rendering it unnecessary to duplicate that content in here.
[CommonMark Markdown Reference](http://commonmark.org/help/) [CommonMark Markdown Reference](http://commonmark.org/help/)

View File

@@ -34,9 +34,14 @@ OC.L10N.register(
"Later" : "Después", "Later" : "Después",
"copy" : "copiar", "copy" : "copiar",
"Done" : "Hecho", "Done" : "Hecho",
"The file was uploaded" : "El archivo ha sido subido",
"The uploaded file exceeds the upload_max_filesize directive in php.ini" : "El archivo cargado excede el valor establecido en la directiva upload_max_filesize en el archivo php.ini",
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "El archivo subido sobrepasa el valor MAX_FILE_SIZE especificada en el formulario HTML", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "El archivo subido sobrepasa el valor MAX_FILE_SIZE especificada en el formulario HTML",
"The file was only partially uploaded" : "El archivo sólo fue cargado parcialmente",
"No file was uploaded" : "No se subió ningún archivo ", "No file was uploaded" : "No se subió ningún archivo ",
"Missing a temporary folder" : "Falta un directorio temporal", "Missing a temporary folder" : "Falta un directorio temporal",
"Could not write file to disk" : "No se pudo escribir el archivo en el disco",
"A PHP extension stopped the file upload" : "Una extensión de PHP detuvo la carga del archivo",
"Card not found" : "Tarjeta no encontrada", "Card not found" : "Tarjeta no encontrada",
"Invalid date, date format must be YYYY-MM-DD" : "La fecha es inválida, favor de seguir el formato AAAA-MM-DD", "Invalid date, date format must be YYYY-MM-DD" : "La fecha es inválida, favor de seguir el formato AAAA-MM-DD",
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in Markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 📎 Attach files and embed them in your Markdown description\n- 💬 Discuss with your team using comments\n- ⚡ Keep track of changes in the activity stream\n- 🚀 Get your project organized" : "Deck es una herramienta de organización de estilo kanban dirigida a la planificación personal y la organización de proyectos para equipos integrados con Nextcloud.\n\n\n- 📥 Agrega tus tareas a las tarjetas y ordénalas.\n- 📄 Escriba notas adicionales\n- 🔖 Asignar etiquetas para una organización mejor\n- 👥 Comparte con tu equipo, amigos o familia.\n- 📎 Adjuntar archivos e incrustarlos en su descripción\n- 💬 Discuta con su equipo usando comentarios.\n- ⚡ Mantenga un registro de los cambios en el flujo de actividad\n- 🚀 Organiza tu proyecto", "Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in Markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 📎 Attach files and embed them in your Markdown description\n- 💬 Discuss with your team using comments\n- ⚡ Keep track of changes in the activity stream\n- 🚀 Get your project organized" : "Deck es una herramienta de organización de estilo kanban dirigida a la planificación personal y la organización de proyectos para equipos integrados con Nextcloud.\n\n\n- 📥 Agrega tus tareas a las tarjetas y ordénalas.\n- 📄 Escriba notas adicionales\n- 🔖 Asignar etiquetas para una organización mejor\n- 👥 Comparte con tu equipo, amigos o familia.\n- 📎 Adjuntar archivos e incrustarlos en su descripción\n- 💬 Discuta con su equipo usando comentarios.\n- ⚡ Mantenga un registro de los cambios en el flujo de actividad\n- 🚀 Organiza tu proyecto",

View File

@@ -32,9 +32,14 @@
"Later" : "Después", "Later" : "Después",
"copy" : "copiar", "copy" : "copiar",
"Done" : "Hecho", "Done" : "Hecho",
"The file was uploaded" : "El archivo ha sido subido",
"The uploaded file exceeds the upload_max_filesize directive in php.ini" : "El archivo cargado excede el valor establecido en la directiva upload_max_filesize en el archivo php.ini",
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "El archivo subido sobrepasa el valor MAX_FILE_SIZE especificada en el formulario HTML", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "El archivo subido sobrepasa el valor MAX_FILE_SIZE especificada en el formulario HTML",
"The file was only partially uploaded" : "El archivo sólo fue cargado parcialmente",
"No file was uploaded" : "No se subió ningún archivo ", "No file was uploaded" : "No se subió ningún archivo ",
"Missing a temporary folder" : "Falta un directorio temporal", "Missing a temporary folder" : "Falta un directorio temporal",
"Could not write file to disk" : "No se pudo escribir el archivo en el disco",
"A PHP extension stopped the file upload" : "Una extensión de PHP detuvo la carga del archivo",
"Card not found" : "Tarjeta no encontrada", "Card not found" : "Tarjeta no encontrada",
"Invalid date, date format must be YYYY-MM-DD" : "La fecha es inválida, favor de seguir el formato AAAA-MM-DD", "Invalid date, date format must be YYYY-MM-DD" : "La fecha es inválida, favor de seguir el formato AAAA-MM-DD",
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in Markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 📎 Attach files and embed them in your Markdown description\n- 💬 Discuss with your team using comments\n- ⚡ Keep track of changes in the activity stream\n- 🚀 Get your project organized" : "Deck es una herramienta de organización de estilo kanban dirigida a la planificación personal y la organización de proyectos para equipos integrados con Nextcloud.\n\n\n- 📥 Agrega tus tareas a las tarjetas y ordénalas.\n- 📄 Escriba notas adicionales\n- 🔖 Asignar etiquetas para una organización mejor\n- 👥 Comparte con tu equipo, amigos o familia.\n- 📎 Adjuntar archivos e incrustarlos en su descripción\n- 💬 Discuta con su equipo usando comentarios.\n- ⚡ Mantenga un registro de los cambios en el flujo de actividad\n- 🚀 Organiza tu proyecto", "Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in Markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 📎 Attach files and embed them in your Markdown description\n- 💬 Discuss with your team using comments\n- ⚡ Keep track of changes in the activity stream\n- 🚀 Get your project organized" : "Deck es una herramienta de organización de estilo kanban dirigida a la planificación personal y la organización de proyectos para equipos integrados con Nextcloud.\n\n\n- 📥 Agrega tus tareas a las tarjetas y ordénalas.\n- 📄 Escriba notas adicionales\n- 🔖 Asignar etiquetas para una organización mejor\n- 👥 Comparte con tu equipo, amigos o familia.\n- 📎 Adjuntar archivos e incrustarlos en su descripción\n- 💬 Discuta con su equipo usando comentarios.\n- ⚡ Mantenga un registro de los cambios en el flujo de actividad\n- 🚀 Organiza tu proyecto",

View File

@@ -176,7 +176,7 @@ class Application extends App implements IBootstrap {
$permissionService = $this->getContainer()->get(PermissionService::class); $permissionService = $this->getContainer()->get(PermissionService::class);
try { try {
return $permissionService->checkPermission($cardMapper, (int) $name, Acl::PERMISSION_READ); return $permissionService->checkPermission($cardMapper, (int)$name, Acl::PERMISSION_READ);
} catch (\Exception $e) { } catch (\Exception $e) {
return false; return false;
} }

View File

@@ -72,17 +72,17 @@ final class TransferOwnership extends Command {
try { try {
$board = $boardId ? $this->boardMapper->find($boardId) : null; $board = $boardId ? $this->boardMapper->find($boardId) : null;
} catch (\Exception $e) { } catch (\Exception $e) {
$output->writeln("Could not find a board for the provided id."); $output->writeln('Could not find a board for the provided id.');
return 1; return 1;
} }
if ($boardId !== null && $board->getOwner() !== $owner) { if ($boardId !== null && $board->getOwner() !== $owner) {
$output->writeln("$owner is not the owner of the board $boardId (" . $board->getTitle() . ")"); $output->writeln("$owner is not the owner of the board $boardId (" . $board->getTitle() . ')');
return 1; return 1;
} }
if ($boardId) { if ($boardId) {
$output->writeln("Transfer board " . $board->getTitle() . " from ". $board->getOwner() ." to $newOwner"); $output->writeln('Transfer board ' . $board->getTitle() . ' from '. $board->getOwner() ." to $newOwner");
} else { } else {
$output->writeln("Transfer all boards from $owner to $newOwner"); $output->writeln("Transfer all boards from $owner to $newOwner");
} }
@@ -94,12 +94,12 @@ final class TransferOwnership extends Command {
if ($boardId) { if ($boardId) {
$this->boardService->transferBoardOwnership($boardId, $newOwner, $remapAssignment); $this->boardService->transferBoardOwnership($boardId, $newOwner, $remapAssignment);
$output->writeln("<info>Board " . $board->getTitle() . " from ". $board->getOwner() ." transferred to $newOwner completed</info>"); $output->writeln('<info>Board ' . $board->getTitle() . ' from '. $board->getOwner() ." transferred to $newOwner completed</info>");
return 0; return 0;
} }
foreach ($this->boardService->transferOwnership($owner, $newOwner, $remapAssignment) as $board) { foreach ($this->boardService->transferOwnership($owner, $newOwner, $remapAssignment) as $board) {
$output->writeln(" - " . $board->getTitle() . " transferred"); $output->writeln(' - ' . $board->getTitle() . ' transferred');
} }
$output->writeln("<info>All boards from $owner to $newOwner transferred</info>"); $output->writeln("<info>All boards from $owner to $newOwner transferred</info>");

View File

@@ -12,27 +12,17 @@ use OCA\Deck\Notification\NotificationHelper;
use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Utility\ITimeFactory; use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\Job; use OCP\BackgroundJob\Job;
use OCP\ILogger; use Psr\Log\LoggerInterface;
class ScheduledNotifications extends Job { class ScheduledNotifications extends Job {
/** @var CardMapper */
protected $cardMapper;
/** @var NotificationHelper */
protected $notificationHelper;
/** @var ILogger */
protected $logger;
public function __construct( public function __construct(
ITimeFactory $time, ITimeFactory $time,
CardMapper $cardMapper, protected CardMapper $cardMapper,
NotificationHelper $notificationHelper, protected NotificationHelper $notificationHelper,
ILogger $logger protected LoggerInterface $logger
) { ) {
parent::__construct($time); parent::__construct($time);
$this->cardMapper = $cardMapper;
$this->notificationHelper = $notificationHelper;
$this->logger = $logger;
} }
/** /**

View File

@@ -14,21 +14,19 @@ namespace OCA\Deck\Cron;
use OCA\Deck\Service\SessionService; use OCA\Deck\Service\SessionService;
use OCP\AppFramework\Utility\ITimeFactory; use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\TimedJob; use OCP\BackgroundJob\TimedJob;
use OCP\ILogger; use Psr\Log\LoggerInterface;
class SessionsCleanup extends TimedJob { class SessionsCleanup extends TimedJob {
private $sessionService;
private $documentService; private $documentService;
private $logger;
private $imageService; private $imageService;
public function __construct(ITimeFactory $time, public function __construct(
SessionService $sessionService, ITimeFactory $time,
ILogger $logger) { private SessionService $sessionService,
private LoggerInterface $logger,
) {
parent::__construct($time); parent::__construct($time);
$this->sessionService = $sessionService;
$this->logger = $logger;
$this->setInterval(SessionService::SESSION_VALID_TIME); $this->setInterval(SessionService::SESSION_VALID_TIME);
} }

View File

@@ -75,7 +75,7 @@ class AclMapper extends DeckMapper implements IPermissionMapper {
try { try {
$entity = $this->find($id); $entity = $this->find($id);
return $entity->getBoardId(); return $entity->getBoardId();
} catch (DoesNotExistException | MultipleObjectsReturnedException $e) { } catch (DoesNotExistException|MultipleObjectsReturnedException $e) {
} }
return null; return null;
} }

View File

@@ -165,7 +165,7 @@ class Card extends RelationalEntity {
$matchDate->setTime(0, 0); $matchDate->setTime(0, 0);
$diff = $today->diff($matchDate); $diff = $today->diff($matchDate);
return (int) $diff->format('%R%a'); // Extract days count in interval return (int)$diff->format('%R%a'); // Extract days count in interval
} }
public function getCalendarPrefix(): string { public function getCalendarPrefix(): string {

View File

@@ -410,7 +410,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
foreach ($query->getDuedate() as $duedate) { foreach ($query->getDuedate() as $duedate) {
$dueDateColumn = $this->databaseType === 'sqlite3' ? $qb->createFunction('DATETIME(`c`.`duedate`)') : 'c.duedate'; $dueDateColumn = $this->databaseType === 'sqlite3' ? $qb->createFunction('DATETIME(`c`.`duedate`)') : 'c.duedate';
$date = $duedate->getValue(); $date = $duedate->getValue();
if ($date === "") { if ($date === '') {
$qb->andWhere($qb->expr()->isNotNull('c.duedate')); $qb->andWhere($qb->expr()->isNotNull('c.duedate'));
continue; continue;
} }
@@ -461,7 +461,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
foreach ($query->getAssigned() as $index => $assignment) { foreach ($query->getAssigned() as $index => $assignment) {
$qb->innerJoin('c', 'deck_assigned_users', 'au' . $index, $qb->expr()->eq('c.id', 'au' . $index . '.card_id')); $qb->innerJoin('c', 'deck_assigned_users', 'au' . $index, $qb->expr()->eq('c.id', 'au' . $index . '.card_id'));
$assignedQueryValue = $assignment->getValue(); $assignedQueryValue = $assignment->getValue();
if ($assignedQueryValue === "") { if ($assignedQueryValue === '') {
$qb->andWhere($qb->expr()->isNotNull('au' . $index . '.participant')); $qb->andWhere($qb->expr()->isNotNull('au' . $index . '.participant'));
continue; continue;
} }
@@ -589,7 +589,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
} }
$this->cache->set('findBoardId:' . $id, $result); $this->cache->set('findBoardId:' . $id, $result);
} }
return $result !== false ? (int) $result : null; return $result !== false ? (int)$result : null;
} }
public function mapOwner(Card &$card) { public function mapOwner(Card &$card) {

View File

@@ -10,27 +10,17 @@ use OCA\Deck\Service\DefaultBoardService;
use OCA\Deck\Service\PermissionService; use OCA\Deck\Service\PermissionService;
use OCP\AppFramework\Middleware; use OCP\AppFramework\Middleware;
use OCP\IL10N; use OCP\IL10N;
use OCP\ILogger; use Psr\Log\LoggerInterface;
class DefaultBoardMiddleware extends Middleware { class DefaultBoardMiddleware extends Middleware {
/** @var ILogger */ public function __construct(
private $logger; private LoggerInterface $logger,
/** @var IL10N */ private IL10N $l10n,
private $l10n; private DefaultBoardService $defaultBoardService,
/** @var DefaultBoardService */ private PermissionService $permissionService,
private $defaultBoardService; private ?string $userId,
/** @var PermissionService */ ) {
private $permissionService;
/** @var string|null */
private $userId;
public function __construct(ILogger $logger, IL10N $l10n, DefaultBoardService $defaultBoardService, PermissionService $permissionService, $userId) {
$this->logger = $logger;
$this->l10n = $l10n;
$this->defaultBoardService = $defaultBoardService;
$this->permissionService = $permissionService;
$this->userId = $userId;
} }
public function beforeController($controller, $methodName) { public function beforeController($controller, $methodName) {
@@ -39,7 +29,7 @@ class DefaultBoardMiddleware extends Middleware {
$this->defaultBoardService->createDefaultBoard($this->l10n->t('Personal'), $this->userId, '0087C5'); $this->defaultBoardService->createDefaultBoard($this->l10n->t('Personal'), $this->userId, '0087C5');
} }
} catch (\Throwable $e) { } catch (\Throwable $e) {
$this->logger->logException($e); $this->logger->error('Could not create default board', ['exception' => $e]);
} }
} }
} }

View File

@@ -15,28 +15,19 @@ use OCP\AppFramework\Middleware;
use OCP\AppFramework\OCS\OCSException; use OCP\AppFramework\OCS\OCSException;
use OCP\AppFramework\OCSController; use OCP\AppFramework\OCSController;
use OCP\IConfig; use OCP\IConfig;
use OCP\ILogger;
use OCP\IRequest; use OCP\IRequest;
use Psr\Log\LoggerInterface;
class ExceptionMiddleware extends Middleware { class ExceptionMiddleware extends Middleware {
/** @var ILogger */
private $logger;
/** @var IConfig */
private $config;
/** @var IRequest */
private $request;
/** /**
* SharingMiddleware constructor. * SharingMiddleware constructor.
*
* @param ILogger $logger
* @param IConfig $config
*/ */
public function __construct(ILogger $logger, IConfig $config, IRequest $request) { public function __construct(
$this->logger = $logger; private LoggerInterface $logger,
$this->config = $config; private IConfig $config,
$this->request = $request; private IRequest $request,
) {
} }
/** /**
@@ -69,9 +60,7 @@ class ExceptionMiddleware extends Middleware {
} }
if ($exception instanceof StatusException) { if ($exception instanceof StatusException) {
if ($this->config->getSystemValue('loglevel', ILogger::WARN) === ILogger::DEBUG) { $this->logger->debug($exception->getMessage(), ['exception' => $exception]);
$this->logger->logException($exception);
}
if ($exception instanceof ConflictException) { if ($exception instanceof ConflictException) {
return new JSONResponse([ return new JSONResponse([
@@ -98,9 +87,9 @@ class ExceptionMiddleware extends Middleware {
'message' => $exceptionMessage, 'message' => $exceptionMessage,
'requestId' => $this->request->getId(), 'requestId' => $this->request->getId(),
]; ];
$this->logger->logException($exception); $this->logger->error($exception->getMessage(), ['exception' => $exception]);
if ($debugMode === true) { if ($debugMode === true) {
$response['exception'] = (array) $exception; $response['exception'] = (array)$exception;
} }
return new JSONResponse($response, 500); return new JSONResponse($response, 500);
} }

View File

@@ -206,9 +206,9 @@ class NotificationHelper {
$notification = $this->notificationManager->createNotification(); $notification = $this->notificationManager->createNotification();
$notification $notification
->setApp('deck') ->setApp('deck')
->setUser((string) $mention['id']) ->setUser((string)$mention['id'])
->setDateTime(new DateTime()) ->setDateTime(new DateTime())
->setObject('card', (string) $card->getId()) ->setObject('card', (string)$card->getId())
->setSubject('card-comment-mentioned', [$card->getTitle(), $boardId, $this->currentUser]) ->setSubject('card-comment-mentioned', [$card->getTitle(), $boardId, $this->currentUser])
->setMessage('{message}', ['message' => $comment->getMessage()]); ->setMessage('{message}', ['message' => $comment->getMessage()]);
$this->notificationManager->notify($notification); $this->notificationManager->notify($notification);

View File

@@ -97,7 +97,7 @@ class BoardReferenceProvider implements IReferenceProvider {
preg_match('/^' . preg_quote($startIndex, '/') . '(?:\/#!?)?\/board\/([0-9]+)$/', $url, $matches); preg_match('/^' . preg_quote($startIndex, '/') . '(?:\/#!?)?\/board\/([0-9]+)$/', $url, $matches);
} }
if ($matches && count($matches) > 1) { if ($matches && count($matches) > 1) {
return (int) $matches[1]; return (int)$matches[1];
} }
return null; return null;
@@ -106,7 +106,7 @@ class BoardReferenceProvider implements IReferenceProvider {
public function getCachePrefix(string $referenceId): string { public function getCachePrefix(string $referenceId): string {
$boardId = $this->getBoardId($referenceId); $boardId = $this->getBoardId($referenceId);
if ($boardId !== null) { if ($boardId !== null) {
return (string) $boardId; return (string)$boardId;
} }
return $referenceId; return $referenceId;

View File

@@ -111,9 +111,9 @@ class CardReferenceProvider extends ADiscoverableReferenceProvider implements IS
if ($ids !== null) { if ($ids !== null) {
[, $cardId] = $ids; [, $cardId] = $ids;
try { try {
$card = $this->cardService->find((int) $cardId)->jsonSerialize(); $card = $this->cardService->find((int)$cardId)->jsonSerialize();
$stack = $this->stackService->find((int) $card['stackId'])->jsonSerialize(); $stack = $this->stackService->find((int)$card['stackId'])->jsonSerialize();
$board = $this->boardService->find((int) $stack['boardId'])->jsonSerialize(); $board = $this->boardService->find((int)$stack['boardId'])->jsonSerialize();
} catch (NoPermissionException $e) { } catch (NoPermissionException $e) {
// Skip throwing if user has no permissions // Skip throwing if user has no permissions
return null; return null;

View File

@@ -73,7 +73,7 @@ class CommentReferenceProvider implements IReferenceProvider {
try { try {
$card = $this->cardService->find($cardId)->jsonSerialize(); $card = $this->cardService->find($cardId)->jsonSerialize();
$board = $this->boardService->find($boardId)->jsonSerialize(); $board = $this->boardService->find($boardId)->jsonSerialize();
$stack = $this->stackService->find((int) $card['stackId'])->jsonSerialize(); $stack = $this->stackService->find((int)$card['stackId'])->jsonSerialize();
} catch (NoPermissionException $e) { } catch (NoPermissionException $e) {
// Skip throwing if user has no permissions // Skip throwing if user has no permissions
return null; return null;
@@ -162,9 +162,9 @@ class CommentReferenceProvider implements IReferenceProvider {
} }
if ($matches && count($matches) > 3) { if ($matches && count($matches) > 3) {
return [ return [
(int) $matches[1], (int)$matches[1],
(int) $matches[2], (int)$matches[2],
(int) $matches[3], (int)$matches[3],
]; ];
} }

View File

@@ -40,6 +40,7 @@ class CardService {
private StackMapper $stackMapper; private StackMapper $stackMapper;
private BoardMapper $boardMapper; private BoardMapper $boardMapper;
private LabelMapper $labelMapper; private LabelMapper $labelMapper;
private LabelService $labelService;
private PermissionService $permissionService; private PermissionService $permissionService;
private BoardService $boardService; private BoardService $boardService;
private NotificationHelper $notificationHelper; private NotificationHelper $notificationHelper;
@@ -61,6 +62,7 @@ class CardService {
StackMapper $stackMapper, StackMapper $stackMapper,
BoardMapper $boardMapper, BoardMapper $boardMapper,
LabelMapper $labelMapper, LabelMapper $labelMapper,
LabelService $labelService,
PermissionService $permissionService, PermissionService $permissionService,
BoardService $boardService, BoardService $boardService,
NotificationHelper $notificationHelper, NotificationHelper $notificationHelper,
@@ -81,6 +83,7 @@ class CardService {
$this->stackMapper = $stackMapper; $this->stackMapper = $stackMapper;
$this->boardMapper = $boardMapper; $this->boardMapper = $boardMapper;
$this->labelMapper = $labelMapper; $this->labelMapper = $labelMapper;
$this->labelService = $labelService;
$this->permissionService = $permissionService; $this->permissionService = $permissionService;
$this->boardService = $boardService; $this->boardService = $boardService;
$this->notificationHelper = $notificationHelper; $this->notificationHelper = $notificationHelper;
@@ -349,8 +352,34 @@ class CardService {
} }
$card->setDescription($description); $card->setDescription($description);
// @var Card $card
$card = $this->cardMapper->update($card); $card = $this->cardMapper->update($card);
$oldBoardId = $this->stackMapper->findBoardId($changes->getBefore()->getStackId());
$boardId = $this->cardMapper->findBoardId($card->getId());
if($boardId !== $oldBoardId) {
$stack = $this->stackMapper->find($card->getStackId());
$board = $this->boardService->find($this->cardMapper->findBoardId($card->getId()));
$boardLabels = $board->getLabels() ?? [];
foreach($card->getLabels() as $cardLabel) {
$this->removeLabel($card->getId(), $cardLabel->getId());
$label = $this->labelMapper->find($cardLabel->getId());
$filteredLabels = array_values(array_filter($boardLabels, fn ($item) => $item->getTitle() === $label->getTitle()));
// clone labels that are assigned to card but don't exist in new board
if (empty($filteredLabels)) {
if ($this->permissionService->getPermissions($boardId)[Acl::PERMISSION_MANAGE] === true) {
$newLabel = $this->labelService->create($label->getTitle(), $label->getColor(), $board->getId());
$boardLabels[] = $label;
$this->assignLabel($card->getId(), $newLabel->getId());
}
} else {
$this->assignLabel($card->getId(), $filteredLabels[0]->getId());
}
}
$board->setLabels($boardLabels);
$this->boardMapper->update($board);
$this->changeHelper->boardChanged($board->getId());
}
if ($resetDuedateNotification) { if ($resetDuedateNotification) {
$this->notificationHelper->markDuedateAsRead($card); $this->notificationHelper->markDuedateAsRead($card);
} }

View File

@@ -17,26 +17,22 @@ use OCP\Comments\IComment;
use OCP\Comments\ICommentsManager; use OCP\Comments\ICommentsManager;
use OCP\Comments\MessageTooLongException; use OCP\Comments\MessageTooLongException;
use OCP\Comments\NotFoundException as CommentNotFoundException; use OCP\Comments\NotFoundException as CommentNotFoundException;
use OCP\ILogger;
use OCP\IUserManager; use OCP\IUserManager;
use OutOfBoundsException; use OutOfBoundsException;
use Psr\Log\LoggerInterface;
use function is_numeric; use function is_numeric;
class CommentService { class CommentService {
private ICommentsManager $commentsManager;
private IUserManager $userManager;
private CardMapper $cardMapper;
private PermissionService $permissionService;
private ILogger $logger;
private ?string $userId;
public function __construct(ICommentsManager $commentsManager, PermissionService $permissionService, CardMapper $cardMapper, IUserManager $userManager, ILogger $logger, ?string $userId) { public function __construct(
$this->commentsManager = $commentsManager; private ICommentsManager $commentsManager,
$this->permissionService = $permissionService; private PermissionService $permissionService,
$this->cardMapper = $cardMapper; private CardMapper $cardMapper,
$this->userManager = $userManager; private IUserManager $userManager,
$this->logger = $logger; private LoggerInterface $logger,
$this->userId = $userId; private ?string $userId,
) {
} }
public function list(string $cardId, int $limit = 20, int $offset = 0): DataResponse { public function list(string $cardId, int $limit = 20, int $offset = 0): DataResponse {
@@ -69,8 +65,8 @@ class CommentService {
private function get(int $cardId, int $commentId): IComment { private function get(int $cardId, int $commentId): IComment {
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_READ); $this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_READ);
try { try {
$comment = $this->commentsManager->get((string) $commentId); $comment = $this->commentsManager->get((string)$commentId);
if ($comment->getObjectType() !== Application::COMMENT_ENTITY_TYPE || (int) $comment->getObjectId() !== $cardId) { if ($comment->getObjectType() !== Application::COMMENT_ENTITY_TYPE || (int)$comment->getObjectId() !== $cardId) {
throw new CommentNotFoundException(); throw new CommentNotFoundException();
} }
} catch (CommentNotFoundException $e) { } catch (CommentNotFoundException $e) {
@@ -138,7 +134,7 @@ class CommentService {
if (!is_numeric($commentId)) { if (!is_numeric($commentId)) {
throw new BadRequestException('A valid comment id must be provided'); throw new BadRequestException('A valid comment id must be provided');
} }
$comment = $this->get((int) $cardId, (int) $commentId); $comment = $this->get((int)$cardId, (int)$commentId);
if ($comment->getActorType() !== 'users' || $comment->getActorId() !== $this->userId) { if ($comment->getActorType() !== 'users' || $comment->getActorId() !== $this->userId) {
throw new NoPermissionException('Only authors are allowed to edit their comment.'); throw new NoPermissionException('Only authors are allowed to edit their comment.');
} }
@@ -187,8 +183,8 @@ class CommentService {
try { try {
$displayName = $this->commentsManager->resolveDisplayName($mention['type'], $mention['id']); $displayName = $this->commentsManager->resolveDisplayName($mention['type'], $mention['id']);
} catch (OutOfBoundsException $e) { } catch (OutOfBoundsException $e) {
$this->logger->logException($e); $this->logger->warning('Mention type not registered, can not resolve display name.', ['exception' => $e, 'mention_type' => $mention['type']]);
// No displayname, upon client's discretion what to display. // No display name, upon client's discretion what to display.
$displayName = ''; $displayName = '';
} }

View File

@@ -20,37 +20,21 @@ use OCP\Files\SimpleFS\ISimpleFile;
use OCP\Files\SimpleFS\ISimpleFolder; use OCP\Files\SimpleFS\ISimpleFolder;
use OCP\IConfig; use OCP\IConfig;
use OCP\IL10N; use OCP\IL10N;
use OCP\ILogger;
use OCP\IRequest; use OCP\IRequest;
use Psr\Log\LoggerInterface;
class FileService implements IAttachmentService { class FileService implements IAttachmentService {
private $l10n;
private $appData;
private $request;
private $logger;
private $rootFolder;
private $config;
private $attachmentMapper;
private $mimeTypeDetector;
public function __construct( public function __construct(
IL10N $l10n, private IL10N $l10n,
IAppData $appData, private IAppData $appData,
IRequest $request, private IRequest $request,
ILogger $logger, private LoggerInterface $logger,
IRootFolder $rootFolder, private IRootFolder $rootFolder,
IConfig $config, private IConfig $config,
AttachmentMapper $attachmentMapper, private AttachmentMapper $attachmentMapper,
IMimeTypeDetector $mimeTypeDetector private IMimeTypeDetector $mimeTypeDetector
) { ) {
$this->l10n = $l10n;
$this->appData = $appData;
$this->request = $request;
$this->logger = $logger;
$this->rootFolder = $rootFolder;
$this->config = $config;
$this->attachmentMapper = $attachmentMapper;
$this->mimeTypeDetector = $mimeTypeDetector;
} }
/** /**
@@ -193,6 +177,7 @@ class FileService implements IAttachmentService {
/** /**
* Workaround until ISimpleFile can be fetched as a resource * Workaround until ISimpleFile can be fetched as a resource
* *
* @return \OCP\Files\File
* @throws \Exception * @throws \Exception
*/ */
private function getFileFromRootFolder(Attachment $attachment) { private function getFileFromRootFolder(Attachment $attachment) {

View File

@@ -404,7 +404,7 @@ class BoardImportService {
* @return void * @return void
*/ */
public function setConfig(string $configName, $value): void { public function setConfig(string $configName, $value): void {
if (empty((array) $this->config)) { if (empty((array)$this->config)) {
$this->setConfigInstance(new \stdClass); $this->setConfigInstance(new \stdClass);
} }
$this->config->$configName = $value; $this->config->$configName = $value;

View File

@@ -51,7 +51,7 @@ class DeckJsonService extends ABoardImportService {
if (!is_string($nextcloudUid) && !is_numeric($nextcloudUid)) { if (!is_string($nextcloudUid) && !is_numeric($nextcloudUid)) {
throw new \LogicException('User on setting uidRelation is invalid'); throw new \LogicException('User on setting uidRelation is invalid');
} }
$nextcloudUid = (string) $nextcloudUid; $nextcloudUid = (string)$nextcloudUid;
$this->getImportService()->getConfig('uidRelation')->$exportUid = $this->userManager->get($nextcloudUid); $this->getImportService()->getConfig('uidRelation')->$exportUid = $this->userManager->get($nextcloudUid);
if (!$this->getImportService()->getConfig('uidRelation')->$exportUid) { if (!$this->getImportService()->getConfig('uidRelation')->$exportUid) {
throw new \LogicException('User on setting uidRelation not found: ' . $nextcloudUid); throw new \LogicException('User on setting uidRelation not found: ' . $nextcloudUid);
@@ -106,7 +106,7 @@ class DeckJsonService extends ABoardImportService {
public function getComments(): array { public function getComments(): array {
$comments = []; $comments = [];
foreach ($this->tmpCards as $sourceCard) { foreach ($this->tmpCards as $sourceCard) {
if (!property_exists($sourceCard, "comments")) { if (!property_exists($sourceCard, 'comments')) {
continue; continue;
} }
$commentsOriginal = $sourceCard->comments; $commentsOriginal = $sourceCard->comments;
@@ -125,10 +125,12 @@ class DeckJsonService extends ABoardImportService {
foreach ($this->tmpCards as $sourceCard) { foreach ($this->tmpCards as $sourceCard) {
foreach ($sourceCard->labels as $label) { foreach ($sourceCard->labels as $label) {
$cardId = $this->cards[$sourceCard->id]->getId(); $cardId = $this->cards[$sourceCard->id]->getId();
if ($this->getImportService()->getData()->id === $label->boardId) {
$labelId = $this->labels[$label->id]->getId(); $labelId = $this->labels[$label->id]->getId();
$cardsLabels[$cardId][] = $labelId; $cardsLabels[$cardId][] = $labelId;
} }
} }
}
return $cardsLabels; return $cardsLabels;
} }

View File

@@ -71,7 +71,7 @@ class TrelloJsonService extends ABoardImportService {
if (!is_string($nextcloudUid) && !is_numeric($nextcloudUid)) { if (!is_string($nextcloudUid) && !is_numeric($nextcloudUid)) {
throw new \LogicException('User on setting uidRelation is invalid'); throw new \LogicException('User on setting uidRelation is invalid');
} }
$nextcloudUid = (string) $nextcloudUid; $nextcloudUid = (string)$nextcloudUid;
$this->getImportService()->getConfig('uidRelation')->$trelloUid = $this->userManager->get($nextcloudUid); $this->getImportService()->getConfig('uidRelation')->$trelloUid = $this->userManager->get($nextcloudUid);
if (!$this->getImportService()->getConfig('uidRelation')->$trelloUid) { if (!$this->getImportService()->getConfig('uidRelation')->$trelloUid) {
throw new \LogicException('User on setting uidRelation not found: ' . $nextcloudUid); throw new \LogicException('User on setting uidRelation not found: ' . $nextcloudUid);
@@ -141,7 +141,7 @@ class TrelloJsonService extends ABoardImportService {
$message = $this->l10n->t( $message = $this->l10n->t(
"This comment has more than %s characters.\n" . "This comment has more than %s characters.\n" .
"Added as an attachment to the card with name %s.\n" . "Added as an attachment to the card with name %s.\n" .
"Accessible on URL: %s.", 'Accessible on URL: %s.',
[ [
IComment::MAX_MESSAGE_LENGTH, IComment::MAX_MESSAGE_LENGTH,
'comment_' . $commentId . '.md', 'comment_' . $commentId . '.md',

View File

@@ -143,7 +143,7 @@ class PermissionService {
try { try {
$board = $this->getBoard($boardId); $board = $this->getBoard($boardId);
return $userId === $board->getOwner(); return $userId === $board->getOwner();
} catch (DoesNotExistException | MultipleObjectsReturnedException $e) { } catch (DoesNotExistException|MultipleObjectsReturnedException $e) {
} }
return false; return false;
} }
@@ -205,8 +205,8 @@ class PermissionService {
*/ */
public function findUsers($boardId, $refresh = false) { public function findUsers($boardId, $refresh = false) {
// cache users of a board so we don't query them for every cards // cache users of a board so we don't query them for every cards
if (array_key_exists((string) $boardId, $this->users) && !$refresh) { if (array_key_exists((string)$boardId, $this->users) && !$refresh) {
return $this->users[(string) $boardId]; return $this->users[(string)$boardId];
} }
try { try {
@@ -269,8 +269,8 @@ class PermissionService {
} }
} }
} }
$this->users[(string) $boardId] = $users; $this->users[(string)$boardId] = $users;
return $this->users[(string) $boardId]; return $this->users[(string)$boardId];
} }
public function canCreate() { public function canCreate() {

View File

@@ -110,7 +110,7 @@ class DeckShareProvider implements \OCP\Share\IShareProvider {
try { try {
$board = $this->boardMapper->find($boardId); $board = $this->boardMapper->find($boardId);
$valid = $valid && !$board->getArchived(); $valid = $valid && !$board->getArchived();
} catch (DoesNotExistException | MultipleObjectsReturnedException $e) { } catch (DoesNotExistException|MultipleObjectsReturnedException $e) {
$valid = false; $valid = false;
} }
@@ -966,8 +966,8 @@ class DeckShareProvider implements \OCP\Share\IShareProvider {
protected function filterSharesOfUser(array $shares): array { protected function filterSharesOfUser(array $shares): array {
// Deck shares when the user has a share exception // Deck shares when the user has a share exception
foreach ($shares as $id => $share) { foreach ($shares as $id => $share) {
$type = (int) $share['share_type']; $type = (int)$share['share_type'];
$permissions = (int) $share['permissions']; $permissions = (int)$share['permissions'];
if ($type === self::SHARE_TYPE_DECK_USER) { if ($type === self::SHARE_TYPE_DECK_USER) {
unset($shares[$share['parent']]); unset($shares[$share['parent']]);

View File

@@ -45,7 +45,7 @@ abstract class BaseValidator {
} else { } else {
if (!$this->{$rule}($value)) { if (!$this->{$rule}($value)) {
throw new BadRequestException( throw new BadRequestException(
$field . ' must be provided and must be '. str_replace("_", " ", $rule)); $field . ' must be provided and must be '. str_replace('_', ' ', $rule));
} }
} }
} }
@@ -111,7 +111,7 @@ abstract class BaseValidator {
*/ */
private function max($value, $limit): bool { private function max($value, $limit): bool {
if (!$limit || !is_numeric($limit)) { if (!$limit || !is_numeric($limit)) {
throw new Exception("Validation rule max requires at least 1 parameter. " . json_encode($limit)); throw new Exception('Validation rule max requires at least 1 parameter. ' . json_encode($limit));
} }
return $this->getSize($value) <= $limit; return $this->getSize($value) <= $limit;
} }
@@ -121,7 +121,7 @@ abstract class BaseValidator {
*/ */
private function min($value, $limit): bool { private function min($value, $limit): bool {
if (!$limit || !is_numeric($limit)) { if (!$limit || !is_numeric($limit)) {
throw new Exception("Validation rule max requires at least 1 parameter."); throw new Exception('Validation rule max requires at least 1 parameter.');
} }
return $this->getSize($value) >= $limit; return $this->getSize($value) >= $limit;
} }
@@ -158,6 +158,6 @@ abstract class BaseValidator {
: $field . ' must be at least '. $parameter . ' characters long '; : $field . ' must be at least '. $parameter . ' characters long ';
} }
return $field . ' must be provided and must be '. str_replace("_", " ", $rule); return $field . ' must be provided and must be '. str_replace('_', ' ', $rule);
} }
} }

274
package-lock.json generated
View File

@@ -1,20 +1,20 @@
{ {
"name": "deck", "name": "deck",
"version": "1.14.0-beta.1", "version": "2.0.0-dev.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "deck", "name": "deck",
"version": "1.14.0-beta.1", "version": "2.0.0-dev.0",
"license": "agpl", "license": "agpl",
"dependencies": { "dependencies": {
"@babel/polyfill": "^7.12.1", "@babel/polyfill": "^7.12.1",
"@babel/runtime": "^7.24.8", "@babel/runtime": "^7.25.6",
"@nextcloud/auth": "^2.3.0", "@nextcloud/auth": "^2.4.0",
"@nextcloud/axios": "^2.5.0", "@nextcloud/axios": "^2.5.0",
"@nextcloud/capabilities": "^1.2.0", "@nextcloud/capabilities": "^1.2.0",
"@nextcloud/dialogs": "^5.3.5", "@nextcloud/dialogs": "^6.0.0",
"@nextcloud/event-bus": "^3.3.1", "@nextcloud/event-bus": "^3.3.1",
"@nextcloud/files": "^3.8.0", "@nextcloud/files": "^3.8.0",
"@nextcloud/initial-state": "^2.2.0", "@nextcloud/initial-state": "^2.2.0",
@@ -22,9 +22,9 @@
"@nextcloud/moment": "^1.3.1", "@nextcloud/moment": "^1.3.1",
"@nextcloud/notify_push": "^1.3.0", "@nextcloud/notify_push": "^1.3.0",
"@nextcloud/router": "^3.0.1", "@nextcloud/router": "^3.0.1",
"@nextcloud/vue": "^8.16.0", "@nextcloud/vue": "^8.17.1",
"blueimp-md5": "^2.19.0", "blueimp-md5": "^2.19.0",
"chroma-js": "^2.6.0", "chroma-js": "^3.0.0",
"dompurify": "^3.1.6", "dompurify": "^3.1.6",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"markdown-it": "^14.1.0", "markdown-it": "^14.1.0",
@@ -52,11 +52,11 @@
"@nextcloud/eslint-config": "^8.4.1", "@nextcloud/eslint-config": "^8.4.1",
"@nextcloud/stylelint-config": "^3.0.1", "@nextcloud/stylelint-config": "^3.0.1",
"@nextcloud/webpack-vue-config": "^6.0.0", "@nextcloud/webpack-vue-config": "^6.0.0",
"@relative-ci/agent": "^4.2.10", "@relative-ci/agent": "^4.2.11",
"@vue/test-utils": "^2.4.6", "@vue/test-utils": "^2.4.6",
"@vue/vue2-jest": "^29.2.6", "@vue/vue2-jest": "^29.2.6",
"cypress": "^13.13.2", "cypress": "^13.14.1",
"eslint-plugin-cypress": "^3.3.0", "eslint-plugin-cypress": "^3.5.0",
"eslint-webpack-plugin": "^4.2.0", "eslint-webpack-plugin": "^4.2.0",
"jest": "^29.7.0", "jest": "^29.7.0",
"jest-serializer-vue": "^3.1.0", "jest-serializer-vue": "^3.1.0",
@@ -1917,9 +1917,9 @@
"peer": true "peer": true
}, },
"node_modules/@babel/runtime": { "node_modules/@babel/runtime": {
"version": "7.25.4", "version": "7.25.6",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.4.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.6.tgz",
"integrity": "sha512-DSgLeL/FNcpXuzav5wfYvHCGvynXkJbn3Zvc3823AEe9nPwW9IK4UoCSS5yGymmQzN0pCPvivtgS6/8U2kkm1w==", "integrity": "sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==",
"dependencies": { "dependencies": {
"regenerator-runtime": "^0.14.0" "regenerator-runtime": "^0.14.0"
}, },
@@ -1994,9 +1994,9 @@
"dev": true "dev": true
}, },
"node_modules/@bundle-stats/plugin-webpack-validate": { "node_modules/@bundle-stats/plugin-webpack-validate": {
"version": "4.14.0", "version": "4.15.0",
"resolved": "https://registry.npmjs.org/@bundle-stats/plugin-webpack-validate/-/plugin-webpack-validate-4.14.0.tgz", "resolved": "https://registry.npmjs.org/@bundle-stats/plugin-webpack-validate/-/plugin-webpack-validate-4.15.0.tgz",
"integrity": "sha512-VLXk50dAriPXM4i1HfH3rX6rKXKqnU7EKI/xkUaRfGgSCiMWsLfNpA/T+gv3CYYXM/HqCM2tXOy3dc9V5OIh8w==", "integrity": "sha512-AKj6okcTFgQMFnJg3rSrLDw4dQ2U9I0WGecKf4qzeW3MsoSgnTW58ZBCebIoODEatw7bhawBlXhkl6tvjkjY4A==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"lodash": "4.17.21", "lodash": "4.17.21",
@@ -3340,14 +3340,14 @@
} }
}, },
"node_modules/@jridgewell/source-map": { "node_modules/@jridgewell/source-map": {
"version": "0.3.5", "version": "0.3.6",
"resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz",
"integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/gen-mapping": "^0.3.5",
"@jridgewell/trace-mapping": "^0.3.9" "@jridgewell/trace-mapping": "^0.3.25"
} }
}, },
"node_modules/@jridgewell/sourcemap-codec": { "node_modules/@jridgewell/sourcemap-codec": {
@@ -3526,9 +3526,9 @@
} }
}, },
"node_modules/@nextcloud/dialogs": { "node_modules/@nextcloud/dialogs": {
"version": "5.3.7", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-5.3.7.tgz", "resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-6.0.0.tgz",
"integrity": "sha512-//pRF2GJNhW3VbVzSoE97J+DR9nZ/+IkzOzgKKDdMr65JYYMAdOs9Iew4nMf+OruDgZanGyXrfubSMVNI+1svQ==", "integrity": "sha512-Yoye/BezFN/hQCic+OHNPSESNI3k7D85YQJU1fW4s/yMi+P6VVNLixp4lbQ7xHF+po5lXZbJhultrOyoNhqaGw==",
"dependencies": { "dependencies": {
"@mdi/js": "^7.4.47", "@mdi/js": "^7.4.47",
"@nextcloud/auth": "^2.3.0", "@nextcloud/auth": "^2.3.0",
@@ -3552,7 +3552,7 @@
"npm": "^10.0.0" "npm": "^10.0.0"
}, },
"peerDependencies": { "peerDependencies": {
"@nextcloud/vue": "^8.9.1", "@nextcloud/vue": "^8.16.0",
"vue": "^2.7.16" "vue": "^2.7.16"
} }
}, },
@@ -3895,9 +3895,9 @@
} }
}, },
"node_modules/@nextcloud/vue": { "node_modules/@nextcloud/vue": {
"version": "8.17.0", "version": "8.17.1",
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-8.17.0.tgz", "resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-8.17.1.tgz",
"integrity": "sha512-BylZZlJcGiEfBO9k/TE8iuKEzzSfmxek1fFwU2fpo0xUDxH9qQurMdTli3ix/kgXaBJgwBD8H8hjzYirpAYbXg==", "integrity": "sha512-DC7nI04pp69vS5VxMDhpwPFhb5TWvyJgtmFciAx6j8RFrTPutdjNfOxOCncGaNXOlodaIpg/6EYV8YHU9DR9ng==",
"dependencies": { "dependencies": {
"@floating-ui/dom": "^1.1.0", "@floating-ui/dom": "^1.1.0",
"@linusborg/vue-simple-portal": "^0.1.5", "@linusborg/vue-simple-portal": "^0.1.5",
@@ -4180,14 +4180,14 @@
} }
}, },
"node_modules/@relative-ci/agent": { "node_modules/@relative-ci/agent": {
"version": "4.2.10", "version": "4.2.11",
"resolved": "https://registry.npmjs.org/@relative-ci/agent/-/agent-4.2.10.tgz", "resolved": "https://registry.npmjs.org/@relative-ci/agent/-/agent-4.2.11.tgz",
"integrity": "sha512-w3aMOrSEyrL6s8i69o6Jjo58WYMz51cI3MuCuoQDKJANew08lXpaQEBI6cyf/gQrVH/ixy9MQhOcESKUqwexEQ==", "integrity": "sha512-EnX0yiSWUkHUnuWzvmysqJJk44EsSmCD7TuXGMgJ9EGxHkAFdEg/+d3+r0UHdThSJ1tDKX6C0h9S4DoOIl8BSQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@bundle-stats/plugin-webpack-filter": "4.14.0", "@bundle-stats/plugin-webpack-filter": "4.15.0",
"@bundle-stats/plugin-webpack-validate": "4.14.0", "@bundle-stats/plugin-webpack-validate": "4.15.0",
"core-js": "3.38.0", "core-js": "3.38.1",
"cosmiconfig": "9.0.0", "cosmiconfig": "9.0.0",
"debug": "4.3.6", "debug": "4.3.6",
"dotenv": "16.4.5", "dotenv": "16.4.5",
@@ -4213,9 +4213,9 @@
} }
}, },
"node_modules/@relative-ci/agent/node_modules/@bundle-stats/plugin-webpack-filter": { "node_modules/@relative-ci/agent/node_modules/@bundle-stats/plugin-webpack-filter": {
"version": "4.14.0", "version": "4.15.0",
"resolved": "https://registry.npmjs.org/@bundle-stats/plugin-webpack-filter/-/plugin-webpack-filter-4.14.0.tgz", "resolved": "https://registry.npmjs.org/@bundle-stats/plugin-webpack-filter/-/plugin-webpack-filter-4.15.0.tgz",
"integrity": "sha512-/p8kMPHyFNcmpgQIOIFkSYObQQUf5F5Gbzsy+dgH+QXSGEppyI1m5Os4BJEBzqS8jUewwzcKVDIQCg2pWoKNAw==", "integrity": "sha512-DQIFkcAkH4VjrDiaoe02c7n5ShGYHIdSMihwDAvRk/4x4PQ1v0/W1kyPxs71glj+6iSddumqNIE28G0DQ4mTQA==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">= 14.0" "node": ">= 14.0"
@@ -4225,9 +4225,9 @@
} }
}, },
"node_modules/@relative-ci/agent/node_modules/core-js": { "node_modules/@relative-ci/agent/node_modules/core-js": {
"version": "3.38.0", "version": "3.38.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.38.0.tgz", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.38.1.tgz",
"integrity": "sha512-XPpwqEodRljce9KswjZShh95qJ1URisBeKCjUdq27YdenkslVe7OO0ZJhlYXAChW7OhXaRLl8AAba7IBfoIHug==", "integrity": "sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw==",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"funding": { "funding": {
@@ -4420,21 +4420,10 @@
"@types/json-schema": "*" "@types/json-schema": "*"
} }
}, },
"node_modules/@types/eslint-scope": {
"version": "3.7.4",
"resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz",
"integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==",
"dev": true,
"peer": true,
"dependencies": {
"@types/eslint": "*",
"@types/estree": "*"
}
},
"node_modules/@types/estree": { "node_modules/@types/estree": {
"version": "1.0.1", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
"integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==" "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw=="
}, },
"node_modules/@types/express": { "node_modules/@types/express": {
"version": "4.17.17", "version": "4.17.17",
@@ -5246,9 +5235,9 @@
} }
}, },
"node_modules/@webassemblyjs/ast": { "node_modules/@webassemblyjs/ast": {
"version": "1.11.6", "version": "1.12.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz",
"integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
@@ -5271,9 +5260,9 @@
"peer": true "peer": true
}, },
"node_modules/@webassemblyjs/helper-buffer": { "node_modules/@webassemblyjs/helper-buffer": {
"version": "1.11.6", "version": "1.12.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz",
"integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==",
"dev": true, "dev": true,
"peer": true "peer": true
}, },
@@ -5297,16 +5286,16 @@
"peer": true "peer": true
}, },
"node_modules/@webassemblyjs/helper-wasm-section": { "node_modules/@webassemblyjs/helper-wasm-section": {
"version": "1.11.6", "version": "1.12.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz",
"integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@webassemblyjs/ast": "1.11.6", "@webassemblyjs/ast": "1.12.1",
"@webassemblyjs/helper-buffer": "1.11.6", "@webassemblyjs/helper-buffer": "1.12.1",
"@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6",
"@webassemblyjs/wasm-gen": "1.11.6" "@webassemblyjs/wasm-gen": "1.12.1"
} }
}, },
"node_modules/@webassemblyjs/ieee754": { "node_modules/@webassemblyjs/ieee754": {
@@ -5337,30 +5326,30 @@
"peer": true "peer": true
}, },
"node_modules/@webassemblyjs/wasm-edit": { "node_modules/@webassemblyjs/wasm-edit": {
"version": "1.11.6", "version": "1.12.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz",
"integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@webassemblyjs/ast": "1.11.6", "@webassemblyjs/ast": "1.12.1",
"@webassemblyjs/helper-buffer": "1.11.6", "@webassemblyjs/helper-buffer": "1.12.1",
"@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6",
"@webassemblyjs/helper-wasm-section": "1.11.6", "@webassemblyjs/helper-wasm-section": "1.12.1",
"@webassemblyjs/wasm-gen": "1.11.6", "@webassemblyjs/wasm-gen": "1.12.1",
"@webassemblyjs/wasm-opt": "1.11.6", "@webassemblyjs/wasm-opt": "1.12.1",
"@webassemblyjs/wasm-parser": "1.11.6", "@webassemblyjs/wasm-parser": "1.12.1",
"@webassemblyjs/wast-printer": "1.11.6" "@webassemblyjs/wast-printer": "1.12.1"
} }
}, },
"node_modules/@webassemblyjs/wasm-gen": { "node_modules/@webassemblyjs/wasm-gen": {
"version": "1.11.6", "version": "1.12.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz",
"integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@webassemblyjs/ast": "1.11.6", "@webassemblyjs/ast": "1.12.1",
"@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6",
"@webassemblyjs/ieee754": "1.11.6", "@webassemblyjs/ieee754": "1.11.6",
"@webassemblyjs/leb128": "1.11.6", "@webassemblyjs/leb128": "1.11.6",
@@ -5368,26 +5357,26 @@
} }
}, },
"node_modules/@webassemblyjs/wasm-opt": { "node_modules/@webassemblyjs/wasm-opt": {
"version": "1.11.6", "version": "1.12.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz",
"integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@webassemblyjs/ast": "1.11.6", "@webassemblyjs/ast": "1.12.1",
"@webassemblyjs/helper-buffer": "1.11.6", "@webassemblyjs/helper-buffer": "1.12.1",
"@webassemblyjs/wasm-gen": "1.11.6", "@webassemblyjs/wasm-gen": "1.12.1",
"@webassemblyjs/wasm-parser": "1.11.6" "@webassemblyjs/wasm-parser": "1.12.1"
} }
}, },
"node_modules/@webassemblyjs/wasm-parser": { "node_modules/@webassemblyjs/wasm-parser": {
"version": "1.11.6", "version": "1.12.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz",
"integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@webassemblyjs/ast": "1.11.6", "@webassemblyjs/ast": "1.12.1",
"@webassemblyjs/helper-api-error": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6",
"@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6",
"@webassemblyjs/ieee754": "1.11.6", "@webassemblyjs/ieee754": "1.11.6",
@@ -5396,13 +5385,13 @@
} }
}, },
"node_modules/@webassemblyjs/wast-printer": { "node_modules/@webassemblyjs/wast-printer": {
"version": "1.11.6", "version": "1.12.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz",
"integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@webassemblyjs/ast": "1.11.6", "@webassemblyjs/ast": "1.12.1",
"@xtuc/long": "4.2.2" "@xtuc/long": "4.2.2"
} }
}, },
@@ -5516,10 +5505,10 @@
"node": ">=0.4.0" "node": ">=0.4.0"
} }
}, },
"node_modules/acorn-import-assertions": { "node_modules/acorn-import-attributes": {
"version": "1.9.0", "version": "1.9.5",
"resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz",
"integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"peerDependencies": { "peerDependencies": {
@@ -5963,10 +5952,9 @@
"dev": true "dev": true
}, },
"node_modules/axios": { "node_modules/axios": {
"version": "1.7.5", "version": "1.7.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.5.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz",
"integrity": "sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw==", "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==",
"license": "MIT",
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.6", "follow-redirects": "^1.15.6",
"form-data": "^4.0.0", "form-data": "^4.0.0",
@@ -6900,9 +6888,9 @@
"dev": true "dev": true
}, },
"node_modules/chroma-js": { "node_modules/chroma-js": {
"version": "2.6.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/chroma-js/-/chroma-js-2.6.0.tgz", "resolved": "https://registry.npmjs.org/chroma-js/-/chroma-js-3.0.0.tgz",
"integrity": "sha512-BLHvCB9s8Z1EV4ethr6xnkl/P2YRFOGqfgvuMG/MyCbZPrTA+NeiByY6XvgF0zP4/2deU2CXnWyMa3zu1LqQ3A==" "integrity": "sha512-ZFn4qxtZTvRJ7XatOLgaHGJYN10LoS6T0EMsu7IVayFG5+b6Yw8wCGQL5qLgo4B+wrRZ9niCrozOQ4a584bvaA=="
}, },
"node_modules/chrome-trace-event": { "node_modules/chrome-trace-event": {
"version": "1.0.3", "version": "1.0.3",
@@ -7731,9 +7719,9 @@
"integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==" "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA=="
}, },
"node_modules/cypress": { "node_modules/cypress": {
"version": "13.13.3", "version": "13.14.1",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-13.13.3.tgz", "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.14.1.tgz",
"integrity": "sha512-hUxPrdbJXhUOTzuML+y9Av7CKoYznbD83pt8g3klgpioEha0emfx4WNIuVRx0C76r0xV2MIwAW9WYiXfVJYFQw==", "integrity": "sha512-Wo+byPmjps66hACEH5udhXINEiN3qS3jWNGRzJOjrRJF3D0+YrcP2LVB1T7oYaVQM/S+eanqEvBWYc8cf7Vcbg==",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
@@ -8495,7 +8483,6 @@
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.7.tgz", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.7.tgz",
"integrity": "sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==", "integrity": "sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==",
"dev": true, "dev": true,
"license": "MIT",
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"bn.js": "^4.11.9", "bn.js": "^4.11.9",
@@ -8584,9 +8571,9 @@
} }
}, },
"node_modules/enhanced-resolve": { "node_modules/enhanced-resolve": {
"version": "5.15.0", "version": "5.17.1",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz",
"integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
@@ -10827,9 +10814,9 @@
} }
}, },
"node_modules/graceful-fs": { "node_modules/graceful-fs": {
"version": "4.2.9", "version": "4.2.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
"dev": true "dev": true
}, },
"node_modules/graphemer": { "node_modules/graphemer": {
@@ -17955,9 +17942,9 @@
"peer": true "peer": true
}, },
"node_modules/serialize-javascript": { "node_modules/serialize-javascript": {
"version": "6.0.1", "version": "6.0.2",
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz",
"integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
@@ -19205,9 +19192,9 @@
} }
}, },
"node_modules/terser": { "node_modules/terser": {
"version": "5.19.2", "version": "5.31.6",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.19.2.tgz", "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.6.tgz",
"integrity": "sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA==", "integrity": "sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
@@ -19224,17 +19211,17 @@
} }
}, },
"node_modules/terser-webpack-plugin": { "node_modules/terser-webpack-plugin": {
"version": "5.3.9", "version": "5.3.10",
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz",
"integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@jridgewell/trace-mapping": "^0.3.17", "@jridgewell/trace-mapping": "^0.3.20",
"jest-worker": "^27.4.5", "jest-worker": "^27.4.5",
"schema-utils": "^3.1.1", "schema-utils": "^3.1.1",
"serialize-javascript": "^6.0.1", "serialize-javascript": "^6.0.1",
"terser": "^5.16.8" "terser": "^5.26.0"
}, },
"engines": { "engines": {
"node": ">= 10.13.0" "node": ">= 10.13.0"
@@ -20526,9 +20513,9 @@
} }
}, },
"node_modules/watchpack": { "node_modules/watchpack": {
"version": "2.4.0", "version": "2.4.2",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz",
"integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
@@ -20641,35 +20628,34 @@
} }
}, },
"node_modules/webpack": { "node_modules/webpack": {
"version": "5.88.2", "version": "5.94.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz",
"integrity": "sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==", "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.5",
"@types/estree": "^1.0.0", "@webassemblyjs/ast": "^1.12.1",
"@webassemblyjs/ast": "^1.11.5", "@webassemblyjs/wasm-edit": "^1.12.1",
"@webassemblyjs/wasm-edit": "^1.11.5", "@webassemblyjs/wasm-parser": "^1.12.1",
"@webassemblyjs/wasm-parser": "^1.11.5",
"acorn": "^8.7.1", "acorn": "^8.7.1",
"acorn-import-assertions": "^1.9.0", "acorn-import-attributes": "^1.9.5",
"browserslist": "^4.14.5", "browserslist": "^4.21.10",
"chrome-trace-event": "^1.0.2", "chrome-trace-event": "^1.0.2",
"enhanced-resolve": "^5.15.0", "enhanced-resolve": "^5.17.1",
"es-module-lexer": "^1.2.1", "es-module-lexer": "^1.2.1",
"eslint-scope": "5.1.1", "eslint-scope": "5.1.1",
"events": "^3.2.0", "events": "^3.2.0",
"glob-to-regexp": "^0.4.1", "glob-to-regexp": "^0.4.1",
"graceful-fs": "^4.2.9", "graceful-fs": "^4.2.11",
"json-parse-even-better-errors": "^2.3.1", "json-parse-even-better-errors": "^2.3.1",
"loader-runner": "^4.2.0", "loader-runner": "^4.2.0",
"mime-types": "^2.1.27", "mime-types": "^2.1.27",
"neo-async": "^2.6.2", "neo-async": "^2.6.2",
"schema-utils": "^3.2.0", "schema-utils": "^3.2.0",
"tapable": "^2.1.1", "tapable": "^2.1.1",
"terser-webpack-plugin": "^5.3.7", "terser-webpack-plugin": "^5.3.10",
"watchpack": "^2.4.0", "watchpack": "^2.4.1",
"webpack-sources": "^3.2.3" "webpack-sources": "^3.2.3"
}, },
"bin": { "bin": {

View File

@@ -1,7 +1,7 @@
{ {
"name": "deck", "name": "deck",
"description": "", "description": "",
"version": "1.14.0-beta.1", "version": "2.0.0-dev.0",
"authors": [ "authors": [
{ {
"name": "Julius Härtl", "name": "Julius Härtl",
@@ -31,11 +31,11 @@
}, },
"dependencies": { "dependencies": {
"@babel/polyfill": "^7.12.1", "@babel/polyfill": "^7.12.1",
"@babel/runtime": "^7.24.8", "@babel/runtime": "^7.25.6",
"@nextcloud/auth": "^2.3.0", "@nextcloud/auth": "^2.4.0",
"@nextcloud/axios": "^2.5.0", "@nextcloud/axios": "^2.5.0",
"@nextcloud/capabilities": "^1.2.0", "@nextcloud/capabilities": "^1.2.0",
"@nextcloud/dialogs": "^5.3.5", "@nextcloud/dialogs": "^6.0.0",
"@nextcloud/event-bus": "^3.3.1", "@nextcloud/event-bus": "^3.3.1",
"@nextcloud/files": "^3.8.0", "@nextcloud/files": "^3.8.0",
"@nextcloud/initial-state": "^2.2.0", "@nextcloud/initial-state": "^2.2.0",
@@ -43,9 +43,9 @@
"@nextcloud/moment": "^1.3.1", "@nextcloud/moment": "^1.3.1",
"@nextcloud/notify_push": "^1.3.0", "@nextcloud/notify_push": "^1.3.0",
"@nextcloud/router": "^3.0.1", "@nextcloud/router": "^3.0.1",
"@nextcloud/vue": "^8.16.0", "@nextcloud/vue": "^8.17.1",
"blueimp-md5": "^2.19.0", "blueimp-md5": "^2.19.0",
"chroma-js": "^2.6.0", "chroma-js": "^3.0.0",
"dompurify": "^3.1.6", "dompurify": "^3.1.6",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"markdown-it": "^14.1.0", "markdown-it": "^14.1.0",
@@ -80,11 +80,11 @@
"@nextcloud/eslint-config": "^8.4.1", "@nextcloud/eslint-config": "^8.4.1",
"@nextcloud/stylelint-config": "^3.0.1", "@nextcloud/stylelint-config": "^3.0.1",
"@nextcloud/webpack-vue-config": "^6.0.0", "@nextcloud/webpack-vue-config": "^6.0.0",
"@relative-ci/agent": "^4.2.10", "@relative-ci/agent": "^4.2.11",
"@vue/test-utils": "^2.4.6", "@vue/test-utils": "^2.4.6",
"@vue/vue2-jest": "^29.2.6", "@vue/vue2-jest": "^29.2.6",
"cypress": "^13.13.2", "cypress": "^13.14.1",
"eslint-plugin-cypress": "^3.3.0", "eslint-plugin-cypress": "^3.5.0",
"eslint-webpack-plugin": "^4.2.0", "eslint-webpack-plugin": "^4.2.0",
"jest": "^29.7.0", "jest": "^29.7.0",
"jest-serializer-vue": "^3.1.0", "jest-serializer-vue": "^3.1.0",

View File

@@ -31,11 +31,11 @@ use OCP\Server;
* @group DB * @group DB
*/ */
class BoardDatabaseTest extends \Test\TestCase { class BoardDatabaseTest extends \Test\TestCase {
public const TEST_USER1 = "test-share-user1"; public const TEST_USER1 = 'test-share-user1';
public const TEST_USER2 = "test-share-user2"; public const TEST_USER2 = 'test-share-user2';
public const TEST_USER3 = "test-share-user3"; public const TEST_USER3 = 'test-share-user3';
public const TEST_USER4 = "test-share-user4"; public const TEST_USER4 = 'test-share-user4';
public const TEST_GROUP1 = "test-share-group1"; public const TEST_GROUP1 = 'test-share-group1';
/** @var BoardService */ /** @var BoardService */
private $boardService; private $boardService;

View File

@@ -71,7 +71,7 @@ class BoardContext implements Context {
break; break;
} }
} }
Assert::assertNotNull($id, "Could not find board named ".$boardName); Assert::assertNotNull($id, 'Could not find board named '.$boardName);
} else { } else {
$id = $this->board['id']; $id = $this->board['id'];
} }

View File

@@ -32,7 +32,7 @@ class SessionContext implements Context {
'boardId' => $board['id'], 'boardId' => $board['id'],
]); ]);
$res = json_decode((string)$this->getResponse()->getBody(), true); $res = json_decode((string)$this->getResponse()->getBody(), true);
Assert::assertArrayHasKey('token', $res['ocs']['data'], "session creation did not respond with a token"); Assert::assertArrayHasKey('token', $res['ocs']['data'], 'session creation did not respond with a token');
// store token // store token
$user = $this->serverContext->getCurrentUser(); $user = $this->serverContext->getCurrentUser();
@@ -44,7 +44,7 @@ class SessionContext implements Context {
*/ */
public function theResponseShouldHaveActiveSessions($length) { public function theResponseShouldHaveActiveSessions($length) {
$board = $this->boardContext->getLastUsedBoard(); $board = $this->boardContext->getLastUsedBoard();
Assert::assertEquals($length, count($board['activeSessions']), "unexpected count of active sessions"); Assert::assertEquals($length, count($board['activeSessions']), 'unexpected count of active sessions');
} }
/** /**
@@ -52,7 +52,7 @@ class SessionContext implements Context {
*/ */
public function theUserShouldBeInTheListOfActiveSessions($user) { public function theUserShouldBeInTheListOfActiveSessions($user) {
$board = $this->boardContext->getLastUsedBoard(); $board = $this->boardContext->getLastUsedBoard();
Assert::assertContains($user, $board['activeSessions'], "user is not found in the list of active sessions"); Assert::assertContains($user, $board['activeSessions'], 'user is not found in the list of active sessions');
} }
/** /**
@@ -67,7 +67,7 @@ class SessionContext implements Context {
$user = $this->serverContext->getCurrentUser(); $user = $this->serverContext->getCurrentUser();
$token = $this->tokens[$user]; $token = $this->tokens[$user];
Assert::assertNotEmpty($token, "no token for the user found"); Assert::assertNotEmpty($token, 'no token for the user found');
$this->requestContext->sendOCSRequest('POST', '/apps/deck/api/v1.0/session/close', [ $this->requestContext->sendOCSRequest('POST', '/apps/deck/api/v1.0/session/close', [
'boardId' => $board['id'], 'boardId' => $board['id'],
'token' => $token 'token' => $token

View File

@@ -88,8 +88,8 @@ class UserExportTest extends \Test\TestCase {
public function getComment($id) { public function getComment($id) {
$comment = new Comment(); $comment = new Comment();
$comment->setActor("users", "admin"); $comment->setActor('users', 'admin');
$comment->setMessage("fake comment" . $id); $comment->setMessage('fake comment' . $id);
return $comment; return $comment;
} }
public function testExecute() { public function testExecute() {

View File

@@ -27,29 +27,24 @@ use OCA\Deck\Db\Card;
use OCA\Deck\Db\CardMapper; use OCA\Deck\Db\CardMapper;
use OCA\Deck\Notification\NotificationHelper; use OCA\Deck\Notification\NotificationHelper;
use OCP\AppFramework\Utility\ITimeFactory; use OCP\AppFramework\Utility\ITimeFactory;
use OCP\ILogger;
use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
use Test\TestCase; use Test\TestCase;
class ScheduledNoificationsTest extends TestCase { class ScheduledNoificationsTest extends TestCase {
/** @var ITimeFactory|MockObject */ protected ITimeFactory&MockObject $timeFactory;
protected $timeFactory; protected CardMapper&MockObject $cardMapper;
/** @var CardMapper|MockObject */ protected NotificationHelper&MockObject $notificationHelper;
protected $cardMapper; protected LoggerInterface&MockObject $logger;
/** @var NotificationHelper|MockObject */ protected ScheduledNotifications $scheduledNotifications;
protected $notificationHelper;
/** @var ILogger|MockObject */
protected $logger;
/** @var ScheduledNotifications */
protected $scheduledNotifications;
public function setUp(): void { public function setUp(): void {
parent::setUp(); parent::setUp();
$this->timeFactory = $this->createMock(ITimeFactory::class); $this->timeFactory = $this->createMock(ITimeFactory::class);
$this->cardMapper = $this->createMock(CardMapper::class); $this->cardMapper = $this->createMock(CardMapper::class);
$this->notificationHelper = $this->createMock(NotificationHelper::class); $this->notificationHelper = $this->createMock(NotificationHelper::class);
$this->logger = $this->createMock(ILogger::class); $this->logger = $this->createMock(LoggerInterface::class);
$this->scheduledNotifications = new ScheduledNotifications($this->timeFactory, $this->cardMapper, $this->notificationHelper, $this->logger); $this->scheduledNotifications = new ScheduledNotifications($this->timeFactory, $this->cardMapper, $this->notificationHelper, $this->logger);
} }

View File

@@ -27,7 +27,7 @@ class AclTest extends \Test\TestCase {
private function createAclUser() { private function createAclUser() {
$acl = new Acl(); $acl = new Acl();
$acl->setId(1); $acl->setId(1);
$acl->setParticipant("admin"); $acl->setParticipant('admin');
$acl->setType(Acl::PERMISSION_TYPE_USER); $acl->setType(Acl::PERMISSION_TYPE_USER);
$acl->setBoardId(1); $acl->setBoardId(1);
$acl->setPermissionEdit(true); $acl->setPermissionEdit(true);
@@ -39,7 +39,7 @@ class AclTest extends \Test\TestCase {
private function createAclGroup() { private function createAclGroup() {
$acl = new Acl(); $acl = new Acl();
$acl->setId(1); $acl->setId(1);
$acl->setParticipant("administrators"); $acl->setParticipant('administrators');
$acl->setType(Acl::PERMISSION_TYPE_GROUP); $acl->setType(Acl::PERMISSION_TYPE_GROUP);
$acl->setBoardId(1); $acl->setBoardId(1);
$acl->setPermissionEdit(true); $acl->setPermissionEdit(true);

View File

@@ -28,7 +28,7 @@ class AttachmentTest extends \Test\TestCase {
$attachment = new Attachment(); $attachment = new Attachment();
$attachment->setId(1); $attachment->setId(1);
$attachment->setCardId(123); $attachment->setCardId(123);
$attachment->setData("blob"); $attachment->setData('blob');
$attachment->setCreatedBy('admin'); $attachment->setCreatedBy('admin');
$attachment->setType('deck_file'); $attachment->setType('deck_file');
return $attachment; return $attachment;

View File

@@ -8,9 +8,9 @@ class BoardTest extends TestCase {
private function createBoard() { private function createBoard() {
$board = new Board(); $board = new Board();
$board->setId(1); $board->setId(1);
$board->setTitle("My Board"); $board->setTitle('My Board');
$board->setOwner("admin"); $board->setOwner('admin');
$board->setColor("000000"); $board->setColor('000000');
$board->setArchived(false); $board->setArchived(false);
// TODO: relation shared labels acl // TODO: relation shared labels acl
return $board; return $board;
@@ -20,9 +20,9 @@ class BoardTest extends TestCase {
$board->setUsers(['user1', 'user2']); $board->setUsers(['user1', 'user2']);
$this->assertEquals([ $this->assertEquals([
'id' => 1, 'id' => 1,
'title' => "My Board", 'title' => 'My Board',
'owner' => "admin", 'owner' => 'admin',
'color' => "000000", 'color' => '000000',
'labels' => [], 'labels' => [],
'permissions' => [], 'permissions' => [],
'stacks' => [], 'stacks' => [],
@@ -44,9 +44,9 @@ class BoardTest extends TestCase {
self::assertNull($board->getLabels()); self::assertNull($board->getLabels());
$this->assertEquals([ $this->assertEquals([
'id' => 1, 'id' => 1,
'title' => "My Board", 'title' => 'My Board',
'owner' => "admin", 'owner' => 'admin',
'color' => "000000", 'color' => '000000',
'labels' => [], 'labels' => [],
'permissions' => [], 'permissions' => [],
'stacks' => [], 'stacks' => [],
@@ -63,13 +63,13 @@ class BoardTest extends TestCase {
public function testSetLabels() { public function testSetLabels() {
$board = $this->createBoard(); $board = $this->createBoard();
$board->setLabels(["foo", "bar"]); $board->setLabels(['foo', 'bar']);
$this->assertEquals([ $this->assertEquals([
'id' => 1, 'id' => 1,
'title' => "My Board", 'title' => 'My Board',
'owner' => "admin", 'owner' => 'admin',
'color' => "000000", 'color' => '000000',
'labels' => ["foo", "bar"], 'labels' => ['foo', 'bar'],
'permissions' => [], 'permissions' => [],
'stacks' => [], 'stacks' => [],
'deletedAt' => 0, 'deletedAt' => 0,
@@ -95,9 +95,9 @@ class BoardTest extends TestCase {
$board->setShared(1); $board->setShared(1);
$this->assertEquals([ $this->assertEquals([
'id' => 1, 'id' => 1,
'title' => "My Board", 'title' => 'My Board',
'owner' => "admin", 'owner' => 'admin',
'color' => "000000", 'color' => '000000',
'labels' => [], 'labels' => [],
'permissions' => [], 'permissions' => [],
'stacks' => [], 'stacks' => [],

View File

@@ -32,13 +32,13 @@ class CardTest extends TestCase {
private function createCard() { private function createCard() {
$card = new Card(); $card = new Card();
$card->setId(1); $card->setId(1);
$card->setTitle("My Card"); $card->setTitle('My Card');
$card->setDescription("a long description"); $card->setDescription('a long description');
$card->setStackId(1); $card->setStackId(1);
$card->setType('text'); $card->setType('text');
$card->setLastModified(234); $card->setLastModified(234);
$card->setCreatedAt(123); $card->setCreatedAt(123);
$card->setOwner("admin"); $card->setOwner('admin');
$card->setOrder(12); $card->setOrder(12);
$card->setArchived(false); $card->setArchived(false);
$card->setDone(null); $card->setDone(null);
@@ -68,8 +68,8 @@ class CardTest extends TestCase {
$card = $this->createCard(); $card = $this->createCard();
$this->assertEquals([ $this->assertEquals([
'id' => 1, 'id' => 1,
'title' => "My Card", 'title' => 'My Card',
'description' => "a long description", 'description' => 'a long description',
'type' => 'text', 'type' => 'text',
'lastModified' => 234, 'lastModified' => 234,
'createdAt' => 123, 'createdAt' => 123,
@@ -96,8 +96,8 @@ class CardTest extends TestCase {
$card->setLabels([]); $card->setLabels([]);
$this->assertEquals([ $this->assertEquals([
'id' => 1, 'id' => 1,
'title' => "My Card", 'title' => 'My Card',
'description' => "a long description", 'description' => 'a long description',
'type' => 'text', 'type' => 'text',
'lastModified' => 234, 'lastModified' => 234,
'createdAt' => 123, 'createdAt' => 123,
@@ -126,8 +126,8 @@ class CardTest extends TestCase {
$card->setLabels([]); $card->setLabels([]);
$this->assertEquals([ $this->assertEquals([
'id' => 1, 'id' => 1,
'title' => "My Card", 'title' => 'My Card',
'description' => "a long description", 'description' => 'a long description',
'type' => 'text', 'type' => 'text',
'lastModified' => 234, 'lastModified' => 234,
'createdAt' => 123, 'createdAt' => 123,

View File

@@ -29,8 +29,8 @@ class LabelTest extends TestCase {
private function createLabel() { private function createLabel() {
$label = new Label(); $label = new Label();
$label->setId(1); $label->setId(1);
$label->setTitle("My Label"); $label->setTitle('My Label');
$label->setColor("000000"); $label->setColor('000000');
return $label; return $label;
} }
public function testJsonSerializeBoard() { public function testJsonSerializeBoard() {

View File

@@ -27,7 +27,7 @@ class StackTest extends \Test\TestCase {
private function createStack() { private function createStack() {
$board = new Stack(); $board = new Stack();
$board->setId(1); $board->setId(1);
$board->setTitle("My Stack"); $board->setTitle('My Stack');
$board->setBoardId(1); $board->setBoardId(1);
$board->setOrder(1); $board->setOrder(1);
return $board; return $board;
@@ -36,7 +36,7 @@ class StackTest extends \Test\TestCase {
$stack = $this->createStack(); $stack = $this->createStack();
$this->assertEquals([ $this->assertEquals([
'id' => 1, 'id' => 1,
'title' => "My Stack", 'title' => 'My Stack',
'order' => 1, 'order' => 1,
'boardId' => 1, 'boardId' => 1,
'deletedAt' => 0, 'deletedAt' => 0,
@@ -45,15 +45,15 @@ class StackTest extends \Test\TestCase {
], $stack->jsonSerialize()); ], $stack->jsonSerialize());
} }
public function testJsonSerializeWithCards() { public function testJsonSerializeWithCards() {
$cards = ["foo", "bar"]; $cards = ['foo', 'bar'];
$stack = $this->createStack(); $stack = $this->createStack();
$stack->setCards($cards); $stack->setCards($cards);
$this->assertEquals([ $this->assertEquals([
'id' => 1, 'id' => 1,
'title' => "My Stack", 'title' => 'My Stack',
'order' => 1, 'order' => 1,
'boardId' => 1, 'boardId' => 1,
'cards' => ["foo", "bar"], 'cards' => ['foo', 'bar'],
'deletedAt' => 0, 'deletedAt' => 0,
'lastModified' => 0, 'lastModified' => 0,
'ETag' => $stack->getETag(), 'ETag' => $stack->getETag(),

View File

@@ -32,21 +32,20 @@ use OCA\Deck\Service\PermissionService;
use OCP\AppFramework\Controller; use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\JSONResponse; use OCP\AppFramework\Http\JSONResponse;
use OCP\IConfig; use OCP\IConfig;
use OCP\ILogger;
use OCP\IRequest; use OCP\IRequest;
use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
class ExceptionMiddlewareTest extends \Test\TestCase { class ExceptionMiddlewareTest extends \Test\TestCase {
/** @var ILogger */ private LoggerInterface&MockObject $logger;
private $logger; private IConfig&MockObject $config;
/** @var IConfig */ private IRequest&MockObject $request;
private $config; private Controller&MockObject $controller;
private $request;
private $controller;
private $exceptionMiddleware; private $exceptionMiddleware;
public function setUp(): void { public function setUp(): void {
$this->logger = $this->createMock(ILogger::class); $this->logger = $this->createMock(LoggerInterface::class);
$this->config = $this->createMock(IConfig::class); $this->config = $this->createMock(IConfig::class);
$this->request = $this->createMock(IRequest::class); $this->request = $this->createMock(IRequest::class);
$this->controller = $this->createMock(Controller::class); $this->controller = $this->createMock(Controller::class);
@@ -70,8 +69,8 @@ class ExceptionMiddlewareTest extends \Test\TestCase {
public function testAfterException($exception, $status, $message) { public function testAfterException($exception, $status, $message) {
$result = $this->exceptionMiddleware->afterException($this->controller, 'bar', $exception); $result = $this->exceptionMiddleware->afterException($this->controller, 'bar', $exception);
$expected = new JSONResponse([ $expected = new JSONResponse([
"status" => $status, 'status' => $status,
"message" => $message 'message' => $message
], $status); ], $status);
$this->assertEquals($expected, $result); $this->assertEquals($expected, $result);
} }

View File

@@ -68,6 +68,8 @@ class CardServiceTest extends TestCase {
private $boardService; private $boardService;
/** @var LabelMapper|MockObject */ /** @var LabelMapper|MockObject */
private $labelMapper; private $labelMapper;
/** @var LabelService|MockObject */
private $labelService;
private $boardMapper; private $boardMapper;
/** @var AttachmentService|MockObject */ /** @var AttachmentService|MockObject */
private $attachmentService; private $attachmentService;
@@ -96,6 +98,7 @@ class CardServiceTest extends TestCase {
$this->stackMapper = $this->createMock(StackMapper::class); $this->stackMapper = $this->createMock(StackMapper::class);
$this->boardMapper = $this->createMock(BoardMapper::class); $this->boardMapper = $this->createMock(BoardMapper::class);
$this->labelMapper = $this->createMock(LabelMapper::class); $this->labelMapper = $this->createMock(LabelMapper::class);
$this->labelService = $this->createMock(LabelService::class);
$this->permissionService = $this->createMock(PermissionService::class); $this->permissionService = $this->createMock(PermissionService::class);
$this->boardService = $this->createMock(BoardService::class); $this->boardService = $this->createMock(BoardService::class);
$this->notificationHelper = $this->createMock(NotificationHelper::class); $this->notificationHelper = $this->createMock(NotificationHelper::class);
@@ -118,6 +121,7 @@ class CardServiceTest extends TestCase {
$this->stackMapper, $this->stackMapper,
$this->boardMapper, $this->boardMapper,
$this->labelMapper, $this->labelMapper,
$this->labelService,
$this->permissionService, $this->permissionService,
$this->boardService, $this->boardService,
$this->notificationHelper, $this->notificationHelper,

View File

@@ -34,38 +34,29 @@ use OCP\Files\SimpleFS\ISimpleFile;
use OCP\Files\SimpleFS\ISimpleFolder; use OCP\Files\SimpleFS\ISimpleFolder;
use OCP\IConfig; use OCP\IConfig;
use OCP\IL10N; use OCP\IL10N;
use OCP\ILogger;
use OCP\IRequest; use OCP\IRequest;
use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
use Test\TestCase; use Test\TestCase;
class FileServiceTest extends TestCase { class FileServiceTest extends TestCase {
/** @var IL10N|MockObject */ private IL10N&MockObject $l10n;
private $l10n; private IAppData&MockObject $appData;
/** @var IAppData|MockObject */ private IRequest&MockObject $request;
private $appData; private LoggerInterface&MockObject $logger;
/** @var IRequest|MockObject */ private IRootFolder&MockObject $rootFolder;
private $request; private IConfig&MockObject $config;
/** @var ILogger|MockObject */ private AttachmentMapper&MockObject $attachmentMapper;
private $logger; private IMimeTypeDetector&MockObject $mimeTypeDetector;
/** @var FileService */ private FileService $fileService;
private $fileService;
/** @var IRootFolder */
private $rootFolder;
/** @var IConfig */
private $config;
/** @var AttachmentMapper|MockObject */
private $attachmentMapper;
/** @var IMimeTypeDetector|MockObject */
private $mimeTypeDetector;
public function setUp(): void { public function setUp(): void {
parent::setUp(); parent::setUp();
$this->request = $this->createMock(IRequest::class); $this->request = $this->createMock(IRequest::class);
$this->appData = $this->createMock(IAppData::class); $this->appData = $this->createMock(IAppData::class);
$this->l10n = $this->createMock(IL10N::class); $this->l10n = $this->createMock(IL10N::class);
$this->logger = $this->createMock(ILogger::class); $this->logger = $this->createMock(LoggerInterface::class);
$this->rootFolder = $this->createMock(IRootFolder::class); $this->rootFolder = $this->createMock(IRootFolder::class);
$this->config = $this->createMock(IConfig::class); $this->config = $this->createMock(IConfig::class);
$this->attachmentMapper = $this->createMock(AttachmentMapper::class); $this->attachmentMapper = $this->createMock(AttachmentMapper::class);

View File

@@ -212,8 +212,8 @@ class StackServiceTest extends TestCase {
$this->stackMapper->expects($this->once())->method('update')->willReturn($stackToBeDeleted); $this->stackMapper->expects($this->once())->method('update')->willReturn($stackToBeDeleted);
$this->cardMapper->expects($this->once())->method('findAll')->willReturn([]); $this->cardMapper->expects($this->once())->method('findAll')->willReturn([]);
$this->stackService->delete(123); $this->stackService->delete(123);
$this->assertTrue($stackToBeDeleted->getDeletedAt() <= time(), "deletedAt is in the past"); $this->assertTrue($stackToBeDeleted->getDeletedAt() <= time(), 'deletedAt is in the past');
$this->assertTrue($stackToBeDeleted->getDeletedAt() > 0, "deletedAt is set"); $this->assertTrue($stackToBeDeleted->getDeletedAt() > 0, 'deletedAt is set');
} }
public function testUpdate() { public function testUpdate() {