Commit Graph

512 Commits

Author SHA1 Message Date
Josh 3f16f3438e fix(files_versions): skip write-hook version creation during cross-storage renames
Signed-off-by: Josh <josh.t.richards@gmail.com>
2026-06-12 10:40:41 -04:00
Louis da706223e4 Merge pull request #61140 from nextcloud/fix/fix-deprecations-in-tests
Fix deprecations in tests
2026-06-11 14:48:10 +02:00
Kate d3c74a545a Merge pull request #60842 from nextcloud/fix/guard-null-path
fix(files_versions): guard null path in event listeners
2026-06-11 10:48:06 +02:00
Côme Chilliet b37044d484 chore: Fix psalm issues following strong typing of IUser
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-11 09:45:32 +02:00
Côme Chilliet 6a69c43526 chore: composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-02 09:47:06 +02:00
Côme Chilliet 9c92cc1617 chore: Suppress last known impure static properties
We will keep these legacy ones for now. We can search for the
 ImpureStaticProperty suppression and add special treatement for them in
 the frankenphp PR if needed.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-02 09:46:20 +02:00
Côme Chilliet 3659b13cd2 chore(files_versions): Be extra-cautious to please psalm
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-02 09:46:19 +02:00
Côme Chilliet 54be8ca769 chore: Remove dead code detected by psalm
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-02 09:46:19 +02:00
Côme Chilliet 9d7c277668 fix: Remove static vars in trashbin, versions and storages
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-02 09:46:16 +02:00
Ferdinand Thiessen f8f5e9e7f9 Merge pull request #59610 from nextcloud/feat/versions-wfe
feat(files_versions): allow to block version creation using WFE
2026-06-01 18:05:23 +02:00
Côme Chilliet 1ab09ec753 chore: Apply new coding standard to all files
The diff can be checked using: git diff --ignore-all-space --ignore-blank-lines
To see only the changes not related to blank lines.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-01 13:46:39 +02:00
Git'Fellow 2e662fc5eb fix(files_versions): guard null path in event listeners
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2026-05-29 17:59:38 +02:00
Ferdinand Thiessen 6ee67884a4 fix(files_version): dispatch CreateVersionEvent as typed event
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-05-27 10:46:40 +02:00
Ferdinand Thiessen fe7bbd6bcd feat(files_versions): allow to block version creation using WFE
This allows users to create workflows to block the versions creation
for some files, based on tags or other conditions using the workflow
engine.
The usecase would be compliance to allow configure some rules to prevent
versioning.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-05-27 10:46:40 +02:00
Côme Chilliet db49744e49 fix(files_version): Rely on DI for principalBackend
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-05-11 16:22:21 +02:00
Ferdinand Thiessen d8e8703796 chore: add missing Override attribute to app code
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-04-28 21:29:28 +02:00
Carl Schwan fbf84e6473 chore: Replace MoveableMount usage with IMovableMount
The former is private API while the IMovableMount is public.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-04-24 10:14:37 +02:00
provokateurin 5f4a5d8c67 refactor(Files): Remove deprecated streamCopy method
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-02-17 06:43:16 +01:00
provokateurin 3693cbeaf9 fix(IMetadataVersion): Use correct return type for getMetadata
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-02-17 06:43:16 +01:00
provokateurin f12cecb684 feat(rector): Enable SafeDeclareStrictTypesRector
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-02-09 10:59:31 +01:00
Benjamin Gaussorgues f56f747f46 Merge pull request #57245 from nextcloud/jtr/refactor-versions-DAV-plugin 2026-01-08 11:12:50 +01:00
Anna Larch a100ede789 feat: extend Entity and adjust QBMapper to support Snowflake IDs
Signed-off-by: Anna Larch <anna@nextcloud.com>
2026-01-06 12:57:17 +01:00
Ferdinand Thiessen 493c371a22 refactor(files_versions): adjust frontend for new files sidebar API
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-01-05 02:23:15 +01:00
Josh 183136d166 chore: Fix comments and formatting in Plugin.php
Signed-off-by: Josh <josh.t.richards@gmail.com>
2025-12-26 19:07:13 -05:00
Josh b872208285 refactor(files_versions): tidy up UA download header logic and modernize class structure
Signed-off-by: Josh <josh.t.richards@gmail.com>
2025-12-26 18:56:56 -05:00
Carl Schwan 4d47fdaa85 chore: Run rector with new rules for fetch
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-11-18 17:45:57 +01:00
Louis Chmn c1e151ca6c fix(files_versions): Do not assume source exist when migrating versions to new storage
Signed-off-by: Louis Chmn <louis@chmn.me>
2025-11-05 18:05:27 +01:00
Git'Fellow f8b1dd6045 fix(files_versions): Add user to error message
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2025-11-04 17:50:18 +01:00
Louis Chmn 8dc64d794c refactor(files_versions): Migrate to Vue3
Signed-off-by: Louis Chmn <louis@chmn.me>
2025-10-24 17:46:44 +02:00
Ferdinand Thiessen 660f3f6fd1 refactor: use logical && || instead of weak and or operators
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-09-27 23:02:18 +02:00
Git'Fellow c5fa862b06 fix(files_versions): Use helper function
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2025-08-28 21:24:52 +02:00
Ferdinand Thiessen 378ddda301 fix(files_versions): has-preview must be either true or false
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-08-07 01:24:07 +02:00
Borja Domínguez Vázquez d0de83be10 feat(file-versions): #53151 add VersionCreatedEvent event
Signed-off-by: Borja Domínguez Vázquez <bdominguez@virtualwareco.com>
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-07-29 14:05:21 +02:00
Borja Domínguez Vázquez cdeed5bcbe chore: get revision for a node
Signed-off-by: Borja Domínguez Vázquez <borja.dominguez@hotmail.com>
Signed-off-by: Borja Domínguez Vázquez <iam.n3uro@gmail.com>

wip

Signed-off-by: Borja Domínguez Vázquez <borja.dominguez@hotmail.com>
Signed-off-by: Borja Domínguez Vázquez <iam.n3uro@gmail.com>

wip

Signed-off-by: Borja Domínguez Vázquez <borja.dominguez@hotmail.com>
Signed-off-by: Borja Domínguez Vázquez <iam.n3uro@gmail.com>

Update IVersionBackend.php

Signed-off-by: Borja Domínguez Vázquez <iam.n3uro@gmail.com>

wip
2025-07-07 14:30:29 +02:00
Borja Domínguez Vázquez 676fb4014d chore: use constants for metadata
Signed-off-by: Borja Domínguez Vázquez <borja.dominguez@hotmail.com>
2025-07-05 22:38:08 +02:00
Arthur Schiwon 38a8546bd6 Merge pull request #52963 from nextcloud/fix/avoid-crashing-versions-listener-on-non-existing-file
fix(files_versions): Log error instead of crashing when event listeners get called on non-existing files
2025-07-03 15:21:25 +02:00
Arthur Schiwon cbc573f787 Merge pull request #53276 from nextcloud/fix/log-failure-from-file-events
fix(files_versions): Log failure to compute node path
2025-07-03 09:45:37 +02:00
Robin Appelman aa15f9d16d chore: run rector
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-07-01 22:45:52 +02:00
Côme Chilliet 5c0e8df427 fix(files_versions): Log error instead of crashing when event listeners get called on non-existing files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-07-01 16:40:57 +02:00
Ferdinand Thiessen 5981b7eb51 chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +02:00
Côme Chilliet 15c8b5ac58 chore: Use an if/else instead of the try/catch to make meaning more obvious
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-17 16:25:45 +02:00
Côme Chilliet 7f1fb65549 fix(files_versions): Log failure to compute node path
To avoid hidden bugs, add some debug logging when a node path cannot be
 computed from a received event, to have more information for debugging

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-03 09:35:23 +02:00
Ferdinand Thiessen 2dcadd2603 fix(files_versions): only close stream if still open, fixing S3
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-18 16:48:56 +02:00
Ferdinand Thiessen 0f69648d0a fix(files_version): use Storage::writeStream instead of deprecated streamCopy if possible
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-16 17:28:24 +02:00
Ferdinand Thiessen 01db539d0a chore: move streamCopy implementation from OC_Helper to OCP\Files
The function was already there but called the legacy version.
So moved the implementation and migrated all usages of it.
Sadly the interface was slightly different so adjusted it to be
compatible with both legacy and the OCP one.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-16 13:03:05 +02:00
Côme Chilliet 2cd491f491 Merge pull request #48560 from nextcloud/fix/migrate-encryption-away-from-hooks
feat(encryption): Migrate from hooks to events
2025-05-14 19:25:51 +02:00
provokateurin 78a175fc74 refactor: Apply rector refactorings
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-14 15:29:02 +02:00
Côme Chilliet 536ccf144c feat(encryption): Migrate from hooks to events
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +02:00
Git'Fellow 1b549d4943 fix(files_versions): Folder should not be hardcoed
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2025-05-09 09:35:17 +02:00
Ferdinand Thiessen 9df998e710 Merge pull request #52369 from nextcloud/fix/files-versions-author
fix(files_versions): wait for version to be created before setting metadata
2025-04-29 11:01:58 +02:00