Commit Graph

96 Commits

Author SHA1 Message Date
Christoph Wurst c1d4f8161b
Migrate internal classes to the OCP db col types
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-12 14:09:13 +01:00
Morris Jobke 24d436cb60
Remove unneeded casts that were found by Psalm
In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521)

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-01-11 13:14:41 +01:00
Christoph Wurst 9ce3ea3368
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-30 14:07:05 +01:00
Christoph Wurst 1e0eaa25d0
Drop all dead packages
Apparently we have plenty of leftover of previous sub-dependencies.
Composer automatically dumps those with any future dependency update, so
I'm dropping them in an atomic step.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-23 09:11:23 +01:00
Joas Schilling 96253c7c1b
Add missing parent::__construct() calls to Jobs
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-14 16:35:12 +01:00
Roeland Jago Douma 6166e1a157
Use proper OCP\BackgroundJobs\Job
And typehunt the IJobList

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-25 15:03:06 +01:00
Joas Schilling 8027dcbc6f
Don't leave cursors open when tests fail
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-09 12:28:17 +01:00
Roeland Jago Douma 1f2ff18439
Make sure the function signatures of the backgroundjob match
Else PHP says no

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-10-26 21:40:55 +01:00
Christoph Wurst d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +02:00
Christoph Wurst 2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Joas Schilling faff16f8cb
Fix PSR-4 compatible namespace
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-27 13:18:45 +02:00
Morris Jobke 0763a17332
Move federated_share_added into a typed event
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-23 08:33:17 +02:00
Joas Schilling 77c9ff838a
Move federation to migrations
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-06 16:42:13 +02:00
Joas Schilling d7c0b9cced
Also always return in app commands
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-26 15:12:11 +02:00
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Christoph Wurst 28f8eb5dba
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +02:00
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>
2020-04-10 14:19:56 +02:00
Christoph Wurst 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +02:00
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +02:00
Christoph Wurst 41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +02:00
Christoph Wurst 2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 10:16:08 +02:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
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>
2019-11-22 20:52:10 +01:00
Roeland Jago Douma dd5862e270
A failing federation sync job is not an error
This is an INFO warning at best. Else it spams the logs continiously.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-08-06 21:07:15 +02:00
Arthur Schiwon 38a90130ce
move log constants to ILogger
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-04-26 10:45:52 +02:00
Bjoern Schiessle 0e0cfa0fa1
improve error reporting and move format parameter to the options
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-04-25 13:53:56 +02:00
Morris Jobke d3d045dd5c
Remove unused import statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-02-14 16:55:43 +01:00
Morris Jobke eb51f06a3b
Use ::class statement instead of string
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-29 12:03:47 +01:00
Morris Jobke 2a38605545
Properly log the full exception instead of only the message
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-23 10:57:21 +01:00
Roeland Jago Douma 2c2e1c4c7a
Catch the errors related to untrusted self signed certificates for federation
* Added tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-11 18:14:01 +01:00
Roeland Jago Douma d24b6866b1
Actually set the status so we don't cause another exception
* And add tests so I don't mess up again

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-11-29 16:37:54 +01:00
Roeland Jago Douma 79554a29e0
Do not log Exception if a connection error occured
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-11-29 13:06:32 +01:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Roeland Jago Douma fbfd371493 Merge pull request #5923 from nextcloud/expire-federation-jobs
Expire federation jobs
2017-08-02 16:15:28 +02:00
Joas Schilling 4ca4b270e7
Close all the cursors
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-02 14:35:14 +02:00
Joas Schilling 81c54ea515
Use automatic injection whenever possible
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-02 14:34:51 +02:00
Lukas Reschke f93a82b8b0
Remove explicit type hints for Controller
This is public API and breaks the middlewares of existing apps. Since this also requires maintaining two different code paths for 12 and 13 I'm at the moment voting for reverting this change.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-08-01 17:32:03 +02:00
Morris Jobke 6010c4f267 Merge pull request #5877 from nextcloud/typehint_middleware
Prop argument type for Middleware
2017-08-01 14:28:16 +02:00
Roeland Jago Douma bc54e6ff7c
Use ITimeFactory
* Inject the timefacotry so we can mock it properly in the tests.
* Extended unit tests to cover the new paths

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-01 11:23:40 +02:00
Bjoern Schiessle 3ffff08819
we don't need to remove the job manually here, even if we ask once more the other server will decline and the background job will be removed
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-08-01 10:07:53 +02:00
Bjoern Schiessle 9c9cb1a6db
cleanup constructors
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-08-01 10:07:53 +02:00
Bjoern Schiessle 06b9e58081
expire requestSharedSecret job after 30 days
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-08-01 10:07:53 +02:00
Bjoern Schiessle 51d85eb2f8
expire getShareadSecret job after 30 days
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-08-01 10:07:51 +02:00
Lukas Reschke d321e9792e
Add |null to PHPDoc
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-08-01 08:20:15 +02:00
Roeland Jago Douma f71dc7523f
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-31 16:54:19 +02:00
Morris Jobke c54a59d51e
Remove unused use statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-22 19:23:31 -05:00
Roeland Jago Douma bec4b468c3
No need to log guzzle exception
When getting/requesting a shared secret there is no need to log the full
exception when an unexpected status code is returned since this won't
really tell us anything as the bad stuff happened on a remote server

Fixes #3380

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-21 11:29:01 +02:00
Björn Schießle b90e91144b Merge pull request #3614 from nextcloud/discover-federatedsharing-endpoints
Discover federatedsharing endpoints
2017-04-12 16:01:07 +02:00
Morris Jobke 1729e4471f
Update comments to Nextcloud
* based on PR by @Ardinis
* see #4311

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-11 23:16:27 -05:00
Roeland Jago Douma 53bca14a27
Do proper DI
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-11 15:04:01 +02:00