Côme Chilliet
d51efd9735
fix: Do not try to create lazy ghosts for PHP internal classes
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-09-28 14:35:49 +07:00
Joas Schilling
17c40b9474
fix(container): Log the deprecation to the app when possible
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-08-08 08:42:55 +07:00
Côme Chilliet
9913bdda90
chore: Cleanup DIContainer class
...
Also removed deprecated tag from the class as this class will not be
removed, only the interface IAppContainer and associated methods should
be removed.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-07-08 13:32:12 +07: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 +07:00
Côme Chilliet
2eed6d3a89
feat: Add a configuration toggle for lazy objects in DI
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-05 20:51:24 +07:00
Côme Chilliet
98b2cfc416
fix: Fix several side effects of lazy ghosts
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-05 20:50:42 +07:00
Côme Chilliet
86ff5810d7
fix: Only use Lazy objects if PHP is 8.4 or higher
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-05 20:49:58 +07:00
Côme Chilliet
1bf41550d0
chore: Suppress psalm error
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-05 20:49:58 +07:00
Côme Chilliet
06c062bebd
feat: Use Lazy ghosts for Dependency injection
...
This will only work with PHP 8.4, so we’ll need to put it behind a version check later.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-05 20:49:38 +07: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 +07:00
Côme Chilliet
c1c59f9a6c
chore: Add missing star in phpdoc comment
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-17 15:26:23 +07:00
Daniel Kesselberg
af6de04e9e
style: update codestyle for coding-standard 1.2.3
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
Andy Scherzinger
dae7c159f7
chore: Add SPDX header
...
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +07:00
Côme Chilliet
672923f0a6
fix: Fix newly spotted psalm issues, add exhaustive typed magic properties for LDAP classes
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-30 09:23:58 +07:00
Côme Chilliet
ab6afe0111
fix: Fix new psalm errors from update
...
Not sure about the SimpleContainer modification, let’s see what CI says
about that.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-08 11:29:09 +07:00
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>
2023-11-23 10:36:13 +07:00
Christoph Wurst
78842348b2
feat(dependencyinjection): Allow optional (nullable) services
...
Allows working with classes that might or might not be available.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-11-03 11:53:43 +07:00
Anna Larch
558e386e46
fix(CardDAV): catch right exception when checking for federated app classes
...
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-07-06 13:07:14 +07:00
Ferdinand Thiessen
ba8a50c059
fix: Throw `NotFoundExceptionInterface` to fulfill PSR container interface if class not found
...
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
2023-02-06 14:16:35 +07:00
Côme Chilliet
f5c361cf44
composer run cs:fix
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +07:00
Carl Schwan
2a864ec13c
Improve dependency injection error message
...
Change from display the name of the parameter to the type of the
parameter. This is that in most cases is usefull.
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-12-01 12:46:01 +07: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 +07:00
Carl Schwan
7d272c54d0
Add a built-in profiler inside Nextcloud
...
The webui is provided by a seperate application named profiler
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-04 10:28:26 +07:00
Côme Chilliet
113756db30
Fix ArrayAccess and JsonSerializable return types
...
First round of modifications for PHP 8.1
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:56 +07:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Christoph Wurst
7287a15acb
Bump psr/container from 1.0.0 to 1.1.1
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-03-10 19:44:09 +07:00
Robin Appelman
ec875227ec
forward query exception when fallback construction fails
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-02-09 13:15:22 +07:00
Robin Appelman
3401be216d
forward original query exception when querying by name fails
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-02-08 19:13:25 +07:00
Roeland Jago Douma
51a02c8009
ReflectionParamter::getClass is deprecated
...
In php8 this starts throwing warnings. And since we use it quite often
we flood the log. This moves it to getType which does the same. Only non
deprecated now.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-11 20:42:14 +07: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 +07: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 +07:00
Christoph Wurst
cb057829f7
Update license headers for 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +07: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 +07: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 +07:00
Christoph Wurst
5bf3d1bb38
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +07: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 +07: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 +07:00
Roeland Jago Douma
0e5147f001
Fix tests
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-11-02 19:20:37 +07:00
Robin Appelman
dccbdc8c01
only catch QueryException when trying to build class
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-09-21 18:32:15 +07:00
Joas Schilling
1dd40b1f45
Single quotes
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-07 16:50:18 +07:00
Joas Schilling
559978c50e
Suppress phan error
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-07 16:43:16 +07:00
Joas Schilling
09d8387b00
Try without autoloading
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-06 13:56:44 +07:00
Joas Schilling
97c4c00e3f
Better debugging for "Your test case is not allowed to access the database."
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-05 16:06:29 +07:00
Morris Jobke
0eebff152a
Update license headers
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +07:00
Joas Schilling
8b3deb00b3
When we can not create the class, try if the variable is a registered service
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-05 16:33:19 +07:00
Lukas Reschke
598b243838
Merge pull request #1426 from nextcloud/sanitze_opt
...
Optimize sanitizeName
2016-09-26 14:10:50 +07:00
Joas Schilling
d9063b6141
Use default value instead of throwing when the service could not be found
2016-09-20 13:26:06 +07:00
Roeland Jago Douma
e200eda18d
Optimize sanitizeName
2016-09-16 09:52:52 +07:00
Joas Schilling
ba87db3fcc
Fix others
2016-07-21 18:13:57 +07:00
Lukas Reschke
aba539703c
Update license headers
2016-05-26 19:57:24 +07:00