zak39
a98ba27a0f
fix(route): Change "core.ProfilePage.index" to lowercase
...
Signed-off-by: zak39 <fotia.baptiste@hotmail.com>
2025-08-20 11:52:36 +07:00
Joas Schilling
a957e3a2c2
feat(occ): Add commands to list all routes and match a single one
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-06-25 08:19:08 +07:00
Côme Chilliet
b188fad8e8
fix(router): In debug mode, cache routes only for 3 seconds
...
This allows testing a newly added or changed route in your application
without having to wait 1 hour or bump the application version.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-12 16:12:22 +07:00
Côme Chilliet
bb485fb733
fix: Load all partially enabled apps routes
...
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>
2025-06-05 18:06:08 +07:00
Côme Chilliet
0d78c60759
fix: Fix psalm issue by adding missing parameter for profiler
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-05 17:58:54 +07:00
Côme Chilliet
446b22ac3c
feat(router): Add fallback for legacy action and file routes
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-05 17:58:54 +07:00
Côme Chilliet
216da3a81c
fix: Deprecate action and actionInclude from routes and fix actionInclude
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-05 17:58:53 +07:00
Côme Chilliet
5c9092bc5b
fix: Use a more fitting cache key
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-05 17:58:53 +07:00
Côme Chilliet
01575b7d95
feat(router): Use Symfony CompiledUrlMatcherDumper to cache routes
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-05 17:58:53 +07:00
Côme Chilliet
ee3abdd81b
feat(router): Cache routes in local cache if possible
...
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>
2025-06-05 17:58:46 +07:00
provokateurin
db70ff6488
refactor(App): Remove registerRoutes method
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-15 13:46:14 +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
34139987d6
fix: Replace OC_App calls by IAppManager
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-24 17:48:34 +07:00
skjnldsv
2e50a39265
fix(files): properly forward open params from short urls
...
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-02-18 10:53:23 +07:00
skjnldsv
54be2ef0f3
fix(profile): add legacy root for old `core.ProfilePage.index`
...
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-11-14 10:25:33 +07:00
provokateurin
9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +07:00
Côme Chilliet
7ed583cb8e
chore: Migrate cleanAppId and getAppPath calls to IAppManager from OC_App
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-13 10:08:43 +07:00
provokateurin
12b44844e1
fix(Router): Load attribute routes of all apps when not app is specified
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-08-27 10:42:47 +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
provokateurin
4c5e05f37e
fix(Router): Stop loading routes of disabled apps
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-05-10 07:22:25 +07:00
Côme Chilliet
733a818139
fix: Migrate a few more classes away from OC_App::getAppPath
...
Also fixed AppTest
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-22 12:19:01 +07:00
Côme Chilliet
ec5133b739
fix: Apply new coding standard to all files
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
provokateurin
df6175ccb1
feat(AppFramework): Add Route attribute
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-02-21 12:07:50 +07:00
provokateurin
66e7056c5e
fix(Routing): Only use lowercase names for registering and matching routes
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-02-21 12:07:50 +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
Hamid Dehnavi
d0b20534b9
Refactor "substr" calls to improve code readability
...
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-07-07 04:54:20 +07: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 +07:00
Robin Appelman
b911da3e1e
DI for Router
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-13 22:51:14 +07:00
Robin Appelman
b68be79464
more routing performance instrumentation
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-10 11:12:26 +07:00
luz paz
368f83095d
Fix typos in lib/private subdirectory
...
Found via `codespell -q 3 -S l10n -L jus ./lib/private`
Signed-off-by: luz paz <luzpaz@github.com>
2022-07-27 08:52:17 +07:00
Côme Chilliet
6be7aa112f
Migrate from ILogger to LoggerInterface in lib/private
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:25 +07:00
Karel Hink
18cc6c11b5
Fix Lots of Error: file_exists(): open_basedir restriction in effect. in Log
...
Signed-off-by: Karel Hink <info@karelhink.cz>
2021-07-30 19:28:52 +07:00
Vincent Petry
8535340d9a
Revert "First attempt to check against core routes before loading all app routes"
...
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-06-29 17:54:30 +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
Julius Härtl
4b1576e978
First attempt to check against core routes before loading all app routes
...
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>
2021-06-02 17:57:04 +07:00
Roeland Jago Douma
618805b14f
Fix RedundantPropertyInitializationCheck
...
For #25839
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-03-09 09:49:45 +07:00
dependabot-preview[bot]
eb502c02ff
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
...
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>
2021-02-18 13:31:24 +07:00
Roeland Jago Douma
484f52bb4d
Also unset the other possible unused paramters
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-16 20:31:30 +07:00
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +07:00
Roeland Jago Douma
72a9c35be3
Remove some IRouter methods
...
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>
2020-11-17 14:08:20 +07:00
Roeland Jago Douma
e25a7137cc
Cleanup route registration logic
...
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>
2020-11-03 09:39:49 +07: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 +07:00
Morris Jobke
387cac4c5f
Properly inject IRouter into URLGenerator to properly encapsulate tests
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-19 22:00:47 +07:00
Morris Jobke
053ee7b386
Only load routes of the app which is requested
...
* Add fallback to load all routes if needed
* Move partial loaded routes test to proper place
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-19 21:58:20 +07:00
Joas Schilling
ea8f68bea6
Hand in the route and the parameters of the request
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2020-08-05 12:52:16 +07:00
Roeland Jago Douma
b57019bcaa
Log the route not found exception on a lower level
...
This should be logged but it is not that critical to wanner level 3
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-24 15:39:53 +07:00
Roeland Jago Douma
edc1c77dd9
Do not create a RouteActionHandler object for each route
...
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>
2020-07-07 12:33:22 +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
Joas Schilling
aad16c8508
Fix creation of legacy routes
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-18 11:21:28 +07:00