aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/Utility
Commit message (Collapse)AuthorAgeFilesLines
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-041-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add timezone getter to ITimeFactoryAnna Larch2024-02-131-0/+7
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* Fix typo in varGit'Fellow2024-02-091-1/+1
| | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* enh(dispatcher): enforce psalm ranges in the http dispatcherArthur Schiwon2023-11-241-6/+27
| | | | | | - allows devs to provide int ranges for API arguments Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-1/+1
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* feat(dependencyinjection): Allow optional (nullable) servicesChristoph Wurst2023-11-031-0/+5
| | | | | | Allows working with classes that might or might not be available. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix version number in ITimeFactory after it was delayedJoas Schilling2023-10-111-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(CardDAV): catch right exception when checking for federated app classesAnna Larch2023-07-061-1/+0
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* feat(appframework): ⌚ Make ITimeFactory extend \PSR\Clock\ClockInterfaceJoas Schilling2023-03-031-1/+25
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix: Throw `NotFoundExceptionInterface` to fulfill PSR container interface ↵Ferdinand Thiessen2023-02-062-2/+44
| | | | | | if class not found Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
* composer run cs:fixCôme Chilliet2023-01-202-3/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Improve dependency injection error messageCarl Schwan2022-12-011-1/+1
| | | | | | | 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>
* Improve container return type annotationsJulius Härtl2022-10-141-0/+9
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add a built-in profiler inside NextcloudCarl Schwan2022-04-041-3/+5
| | | | | | The webui is provided by a seperate application named profiler Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix ArrayAccess and JsonSerializable return typesCôme Chilliet2021-11-231-3/+5
| | | | | | First round of modifications for PHP 8.1 Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-043-3/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Bump psr/container from 1.0.0 to 1.1.1Christoph Wurst2021-03-101-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-181-1/+1
| | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* forward query exception when fallback construction failsRobin Appelman2021-02-091-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* forward original query exception when querying by name failsRobin Appelman2021-02-081-1/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* ReflectionParamter::getClass is deprecatedRoeland Jago Douma2020-11-111-6/+6
| | | | | | | | 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>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-242-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use PSR container interface and deprecate our own abstractionChristoph Wurst2020-07-161-43/+86
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make annotations case insensitiveJoas Schilling2020-06-231-0/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headers for 19Christoph Wurst2020-04-292-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-103-6/+5
| | | | | | | | | | | | | | | 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>
* Use elseif instead of else ifChristoph Wurst2020-04-101-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-053-4/+11
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-223-5/+4
| | | | | | | | | | | * 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>
* Assume that getType is availableDaniel Kesselberg2019-10-141-7/+4
| | | | | | From PHP7 getType is always available. No need to check it nowdays. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Fix ReflectionType::__toString() is deprecatedDaniel Kesselberg2019-10-141-2/+2
| | | | | | | As of PHP 7.1.0, ReflectionType::__toString() is deprecated, and ReflectionParameter::getType() may return an instance of ReflectionNamedType. To get the name of the parameter type, ReflectionNamedType() is available in this case. https://www.php.net/manual/en/reflectionparameter.gettype.php Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Do not try to autoload built in typesRoeland Jago Douma2019-06-041-9/+5
| | | | | | | | 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>
* Fix testsRoeland Jago Douma2018-11-021-1/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Allow to inject/mock `new \DateTime()` similar to time()Joas Schilling2018-10-091-1/+10
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* only catch QueryException when trying to build classRobin Appelman2018-09-211-7/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Single quotesJoas Schilling2018-03-071-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Suppress phan errorJoas Schilling2018-03-071-0/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Try without autoloadingJoas Schilling2018-03-061-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Better debugging for "Your test case is not allowed to access the database."Joas Schilling2018-03-051-0/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Don't try to match on falseRoeland Jago Douma2018-02-211-17/+19
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Strict OCP\AppFramework\Utility\IControllerMethodReflectorRoeland Jago Douma2018-02-211-10/+10
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make the ITimeFactory strict + return typesRoeland Jago Douma2018-01-141-2/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headersMorris Jobke2017-11-062-0/+3
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add isset() as it can be an empty resultLukas Reschke2017-04-131-1/+1
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Add support for ratelimiting via annotationsLukas Reschke2017-04-131-29/+26
| | | | | | | | | | | | | This allows adding rate limiting via annotations to controllers, as one example: ``` @UserRateThrottle(limit=5, period=100) @AnonRateThrottle(limit=1, period=100) ``` Would mean that logged-in users can access the page 5 times within 100 seconds, and anonymous users 1 time within 100 seconds. If only an AnonRateThrottle is specified that one will also be applied to logged-in users. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* handle optional annotation parametersBjoern Schiessle2017-01-181-2/+19
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Fix the regex for annotations with valuesJoas Schilling2017-01-181-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* When we can not create the class, try if the variable is a registered serviceJoas Schilling2016-10-051-0/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #1426 from nextcloud/sanitze_optLukas Reschke2016-09-261-1/+4
|\ | | | | Optimize sanitizeName