Louis Chemineau
fcdc8b47f2
fix(files_versions): Improve files version listing
Signed-off-by: Louis Chemineau <louis@chmn.me>
2 months ago
Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
6 months ago
Robin Appelman
62e6a32899
don't re-get fileinfo for versioned file if it's not shared
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 year ago
Julius Härtl
c22d51c1ad
tests(files_versions): Tear down fs to clear mount cache before testing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 year ago
Côme Chilliet
0753be3ff2
Fix a few tests that were using too big int values for 32bits
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Louis Chemineau
88abb2d97c
Fix versions restoring with S3
Signed-off-by: Louis Chemineau <louis@chmn.me>
1 year ago
Louis Chemineau
6dcfb29cfc
Fix renaming files_versions
Signed-off-by: Louis Chemineau <louis@chmn.me>
1 year ago
Louis Chemineau
c88328e68e
Handle empty files in version creation logic
Signed-off-by: Louis Chemineau <louis@chmn.me>
1 year ago
Louis Chemineau
53d736207c
Adapt files_versions tests to modernized hooks
Signed-off-by: Louis Chemineau <louis@chmn.me>
1 year ago
Louis Chemineau
ea946cc649
Lint and remove file_versions tests
Signed-off-by: Louis Chemineau <louis@chmn.me>
1 year ago
Côme Chilliet
f875642998
Fix dynamic property warning in files_version tests
The code had no effect as $storage is not an instance of SharedStorage,
the call to setValue failed with a warning.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Carl Schwan
49334e4d9c
Fix many tests and warnings
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 year ago
Carl Schwan
48d9c4d2b0
Port existing server code to new interface
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 year ago
Louis Chemineau
14e57bf70a
Replace license information to SPDX expression
Signed-off-by: Louis Chemineau <louis@chmn.me>
2 years ago
Côme Chilliet
37f8f7a5a1
Fix tests on PHP 8.1 for encryption, files_sharing, files_version,
files_trashbin and theming apps
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Daniel Kesselberg
3293428ac0
Add configuration flag to disable the background job for files_versions
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2 years ago
Robin Appelman
d20aad3e8f
test for version expire
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Carl Schwan
0d987dd2a0
Fix tests in files_versions
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 years ago
John Molakvoæ (skjnldsv)
3e624dc399
Bump js licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 years ago
Morris Jobke
d84e1f1951
Re-use fetched dependencies in lib/base.php
Reduces calls to DI container by reusing already fetched dependencies.
For status.php it went from 355 to 344.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
3 years ago
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Roeland Jago Douma
b7dd2074ab
FIX
the assertAttributeEquals got removed.
So we can't run these tests anymore.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
3 years ago
Morris Jobke
f2d05eacc6
VersioningTest:729 is unreliable and should be disabled
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
3 years ago
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Morris Jobke
234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
3 years ago
Morris Jobke
29ffaa5676
Move files_versions to bootstrap mechanism
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
3 years ago
Joas Schilling
a2f34f46b2
Fix tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Joas Schilling
89ed2c37bf
Update share type constant usage
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Christoph Wurst
cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Liam JACK
b6c76f43a1
Fix #19066 - Array offset error due to empty file versions array
Signed-off-by: Liam JACK <liamjack@users.noreply.github.com>
4 years ago
Christoph Wurst
28f8eb5dba
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
2ee65f177e
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Roeland Jago Douma
c1152af523
Move deprecated aliases over to new registration
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Robin Appelman
829f4a1a1b
update tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
4 years ago
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
John Molakvoæ (skjnldsv)
5cb11ca642
Fix tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
4 years ago
Roeland Jago Douma
3a7cf40aaa
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Roeland Jago Douma
c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Roeland Jago Douma
68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Roeland Jago Douma
e9c972f708
Fix share tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Robin Appelman
ccfbee2af9
add way for version backends to programmatically specify if they should be used
this allows for backends that should only be used if specific conditions are met
Signed-off-by: Robin Appelman <robin@icewind.nl>
5 years ago
Robin Appelman
4403d771ad
modular versions api
Allows apps to register version backends for storage types
The existing versions backend is wrapped in a "legacy" backend.
Signed-off-by: Robin Appelman <robin@icewind.nl>
5 years ago