PluginSkeleton icon indicating copy to clipboard operation
PluginSkeleton copied to clipboard

Sylius admin route prefix not customizable

Open lruozzi9 opened this issue 4 years ago • 0 comments

By the v1.8 of Sylius, the SyliusAdminBundle routes prefix can be modified thanks to the use of an environment variable (https://github.com/Sylius/SyliusAdminBundle/commit/eb93fc1c570a2c4642860eb439e6e2c22781dc33).

However, this is possible as long as you don't use plugins with admin routes. Many of these, in fact, define, in the routing configuration file, the admin prefix statically as part of the path (like this). Others don't use the prefix (like this) and let the user define the prefix as here. This second solution will be profitable because you could use the %sylius_admin.path_name% as a prefix. What do you think about these? IMHO we should define a standard compatible with Sylius < 1.8, and for example, updates the routes.yaml file by using the correct prefix parameter or admin if is not defined.

lruozzi9 avatar May 07 '21 14:05 lruozzi9