aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Route
Commit message (Collapse)AuthorAgeFilesLines
* fix: Load all partially enabled apps routesCôme Chilliet2025-06-051-2/+2
| | | | | | | | | | This avoids cache issues if some apps are only enabled for some groups, by loading the routes from all apps enabled for anyone, not only the current user. If the queried application is disabled for the current user based on groups, the middleware will cancel the query. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Fix psalm issue by adding missing parameter for profilerCôme Chilliet2025-06-051-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* feat(router): Add fallback for legacy action and file routesCôme Chilliet2025-06-052-15/+81
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Deprecate action and actionInclude from routes and fix actionIncludeCôme Chilliet2025-06-052-8/+6
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Use a more fitting cache keyCôme Chilliet2025-06-051-2/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* feat(router): Use Symfony CompiledUrlMatcherDumper to cache routesCôme Chilliet2025-06-051-47/+37
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* feat(router): Cache routes in local cache if possibleCôme Chilliet2025-06-051-0/+59
| | | | | | | | | This is not ideal because serializing the routecollection is not easy. It seems Symfony has its own way of doing things by dumping routes to a PHP file, maybe that would be better, but it would mean pulling a new symfony dependency and maybe refactor our Router. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* refactor(App): Remove registerRoutes methodprovokateurin2025-05-151-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* feat: Improve init a bit, and add more profiling stepsCôme Chilliet2025-05-131-2/+8
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Replace OC_App calls by IAppManagerCôme Chilliet2025-02-241-3/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(files): properly forward open params from short urlsskjnldsv2025-02-181-2/+3
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* fix(profile): add legacy root for old `core.ProfilePage.index`skjnldsv2024-11-141-0/+3
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-191-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore: Migrate cleanAppId and getAppPath calls to IAppManager from OC_AppCôme Chilliet2024-09-131-9/+17
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(Router): Load attribute routes of all apps when not app is specifiedprovokateurin2024-08-271-14/+24
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-1/+1
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* chore: Add SPDX headerAndy Scherzinger2024-05-243-76/+12
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix(Router): Stop loading routes of disabled appsprovokateurin2024-05-101-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix: Migrate a few more classes away from OC_App::getAppPathCôme Chilliet2024-04-222-16/+15
| | | | | | Also fixed AppTest Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-021-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* feat(AppFramework): Add Route attributeprovokateurin2024-02-211-0/+68
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix(Routing): Only use lowercase names for registering and matching routesprovokateurin2024-02-211-15/+22
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-5/+5
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Refactor "substr" calls to improve code readabilityHamid Dehnavi2023-07-071-5/+5
| | | | Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
* Refactors "strpos" calls in lib/private to improve code readability.Faraz Samapoor2023-05-151-1/+1
| | | | Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
* DI for RouterRobin Appelman2023-02-132-17/+36
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* more routing performance instrumentationRobin Appelman2023-02-101-4/+11
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix typos in lib/private subdirectoryluz paz2022-07-271-1/+1
| | | | | | Found via `codespell -q 3 -S l10n -L jus ./lib/private` Signed-off-by: luz paz <luzpaz@github.com>
* Migrate from ILogger to LoggerInterface in lib/privateCôme Chilliet2022-03-242-11/+6
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix Lots of Error: file_exists(): open_basedir restriction in effect. in LogKarel Hink2021-07-301-2/+3
| | | | Signed-off-by: Karel Hink <info@karelhink.cz>
* Revert "First attempt to check against core routes before loading all app ↵Vincent Petry2021-06-291-14/+12
| | | | | | routes" Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-043-4/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* First attempt to check against core routes before loading all app routesJulius Härtl2021-06-021-12/+14
| | | | | | | | | Most of the time we will find a matching route in either the loaded ones matched on the URL or in the core ones. Therfore we can attempt to try those first and only load all app routes if no match was found by the Symfony URLMatcher. Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix RedundantPropertyInitializationCheckRoeland Jago Douma2021-03-091-2/+2
| | | | | | For #25839 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-181-3/+3
| | | | | | | | | | 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>
* Also unset the other possible unused paramtersRoeland Jago Douma2020-12-161-0/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove some IRouter methodsRoeland Jago Douma2020-11-171-8/+0
| | | | | | | | | This is not the end. IRouter needs to burn. But it is a start. 🎵 we didn't start the fire 🎵 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Cleanup route registration logicRoeland Jago Douma2020-11-031-2/+9
| | | | | | | | This was a bunch of cylic things being called. This is an attempt to clean this all up. If an app provides an array of routes. We just parse them and hand them back. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Properly inject IRouter into URLGenerator to properly encapsulate testsMorris Jobke2020-08-191-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Only load routes of the app which is requestedMorris Jobke2020-08-191-5/+19
| | | | | | | * Add fallback to load all routes if needed * Move partial loaded routes test to proper place Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Hand in the route and the parameters of the requestJoas Schilling2020-08-051-2/+15
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
* Log the route not found exception on a lower levelRoeland Jago Douma2020-07-241-1/+1
| | | | | | This should be logged but it is not that critical to wanner level 3 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Do not create a RouteActionHandler object for each routeRoeland Jago Douma2020-07-071-9/+19
| | | | | | | | | | This is not required and doesn't allow us to be properly lazy. On top of it this doesnt allow us to cache the routes (since closures/objects can't be cached). This is the first small step into cleaning up the routing we have Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headers for 19Christoph Wurst2020-04-291-1/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix creation of legacy routesJoas Schilling2020-04-181-0/+29
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow some apps to have root URLs in their own routing fileJoas Schilling2020-04-181-1/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-3/+3
| | | | | | | | | | | | | | | 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-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>