Commit Graph

32 Commits

Author SHA1 Message Date
provokateurin
9dc1d6372f fix(IContainer): Fix parameter and return types
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-02-16 10:45:13 +01:00
Carl Schwan
7b6078875b refactor: Run rector on lib/private
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-02-06 13:50:18 +01:00
provokateurin
3dbf848ee9 feat(DI): Abort querying if infinite loop is detected
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-11-05 12:21:19 +01:00
Côme Chilliet
20c6d1a7e9 feat: Improve init a bit, and add more profiling steps
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 16:08:49 +02:00
Andy Scherzinger
dae7c159f7 chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +02:00
Julius Härtl
3846ec2899 Merge pull request #38322 from nextcloud/bugfix/noid/throw-early-app-container 2023-06-06 08:41:08 +02:00
Julius Härtl
6f43ab82fd fix: Throw early when a service cannot be found in the app container
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-05-16 20:32:39 +02:00
Faraz Samapoor
e7cc7653b8 Refactors "strpos" calls in lib/private to improve code readability.
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +03:30
Julius Härtl
f0a0bfaaee Move to str_starts_with
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-12-07 22:32:06 +01:00
Julius Härtl
b2af916872 Take some shortcut when setting up the application class
When getting the application class we can ask the app container directly
and skip the server container as it won't find a match and fallback to
the app container anyways

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-12-07 22:32:05 +01:00
Julius Härtl
cea2f79bbd Improve container return type annotations
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-10-14 10:45:16 +02:00
John Molakvoæ (skjnldsv)
215aef3cbd Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +02:00
Roeland Jago Douma
889bb44b42 First query the server container
When the servercontainer wants to obtain something changes are very high
this is something from the server container. Esp on setups with a lot of
shares this can change quite a bit as it avoid a needless check on the
strpos OCA\\ etc.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-07 17:51:41 +01:00
Joas Schilling
bab4fb98eb Fix overwriteService() for apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-28 09:38:43 +02:00
Christoph Wurst
9bc6a8437d Deprecate the query mothod on the server container
The interface method has already been deprecated, but if some code uses
the concrete type instead, the deprecation is not shown (by phpstorm),
so I think it's better to have this method tagged as well.

The "fix" for this deprecation is to simply use `get` instead of
`query`. Right now this will work 100% the same, but the goal is to slim
down the interface and only use what PSR-11 offers.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-17 08:05:07 +02:00
Christoph Wurst
4152216bd8 Use PSR container interface and deprecate our own abstraction
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-16 13:35:45 +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
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
5bf3d1bb38 Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Christoph Wurst
f6a79338d4 Make sure we create an app's Application class just once
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-10-11 08:21:24 +02:00
Roeland Jago Douma
357263a70b Do not try to autoload built in types
This avoids calls to the autoloader (or chain of autoloaders) to see if
for example 'principalPrefix' class can be found. While we already know
it is a string.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-06-04 15:13:32 +02:00
Joas Schilling
a788da6ac2 Make the file strict
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-05 18:01:14 +01:00
Joas Schilling
c5ab74348c Avoid duplicate App container creation
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-05 17:55:35 +01:00
Joas Schilling
78abbf72b0 Make TestCase->overwriteService() work with App classes
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-02-14 08:40:21 +01:00
Joas Schilling
a411adee6c Fix missing argument 2 for Settings classes
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-19 22:32:50 +02:00
Joas Schilling
c1cc8193a7 Allow automatic DI for apps that don't register the container in app.php
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-16 17:37:41 +02:00
Joas Schilling
f23a36b0a6 Add activities when email or password is changed
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-13 11:13:19 +02:00
Joas Schilling
9667ac2b8e Register the namespace with the autoloading to allow reverse recovery
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-22 11:55:04 +01:00
Joas Schilling
5695a4ec92 Don't do a recursive search
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-22 10:44:13 +01:00
Joas Schilling
94432c089f Save the container with the app's namespace so we can resolve it 2016-08-22 14:25:43 +02:00
Joas Schilling
ba87db3fcc Fix others 2016-07-21 18:13:57 +02:00
Roeland Jago Douma
f52c5b31b6 Move more from \OC to PSR-4
* \OC\OCSClient
* \OC\Preview
* \OC\PreviewManager
* \OC\Repair
* \OC\RepairException
* \OC\Search
* \OC\ServerContainer
* \OC\ServerNotAvailableException
* \OC\ServiceUnavailableException
* \OC\Setup
* \OC\Streamer
* \OC\SubAdmin
* \OC\SystemConfig
* \OC\TagManager
* \OC\Tags
* \OC\TempManager
* \OC\TemplateLayout
* \OC\URLGenerator
* \OC\Updater
2016-04-29 15:08:01 +02:00