[9.x] Fix Duplicate Route Namespace#41021
Conversation
|
If you use controller classes in your route it's intended to not set the namespace. That's why it's disabled by default in the skeleton. You either use one or the other. I see there's no docs for this but that's because we're trying to move people away from this setting and use class referenced controllers more. |
|
I get that it's disabled but is there a reason not being flexible no matter if you set a namespace? |
|
When you have namespaced groups you cannot use the new controller method or even invokable controllers which I think we should allow to. Main reason we have namespaced groups is when used with modules/domains which means including multiple route files. Invokable controllers should not be affected by group namespaces tho |
That's what I'm trying to say: I think we removed this from the docs to no longer promote namespaced groups. |
|
This has come up a few times and I guess I am willing to try merging this. It will break applications that literally have the namespace repeated intentionally ( |
When you are using group namespaces you cannot use the group controller method or single action controllers.
Also you cannot use the controller class as a parameter on your route
This works
The following scenarios are not working
Controller group
Single Action Controller
The solution I came up with is to not prepend the group namespace if the controller class starts with the same namespace