-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Describe the bug
Enabling the pretty URLs breaks the function with the following error:
When using pretty URLs, all CRUD controllers must have unique PHP class names to generate unique route names. However, your application has at least two controllers with the FQCN "App\Controller\Admin\TaskCrudController", generating the route "admin_task_index". Even if both CRUD controllers are in different namespaces, they cannot have the same class name. Rename one of these controllers to resolve the issue in . (which is being imported from "/app/config/routes/easyadmin.yaml"). Make sure there is a loader supporting the "easyadmin.routes" type.
To Reproduce
Re-use a Controller name in two separate namespaces
I'm reporting this as a bug, because I think there is no reason for EasyAdmin to force a globally unique class name upon us. That's why the namespaces were created in the first place.
If the namespace can't be part of the automatic route name, allow the controller to define its own (unique) route prefix to work around this issue.
Or is there any real reason for this?
Metadata
Metadata
Assignees
Labels
No labels