Sylius / AdminOrderCreationPlugin

Create orders in Sylius as an Administrator
MIT License
56 stars 50 forks source link

move out admin outside of plugin #118

Open m0sviatoslav opened 5 years ago

Zales0123 commented 5 years ago

Hello @m0sviatoslav and thank you for your contribution! From the technical point of view, it totally makes sense, as we lower the amount of duplicated prefixes and therefore an amount of code. However, as we use a Symfony Flex during the plugin installation, the src/Resources/config/app/routing.yml file is imported directly to the application. This change would require from us to add an admin/ prefix in a plugin recipe and to mention it in the installation process without a Symfony Flex. In the end, if someone would miss it, it would be possible to have strictly-admin routes imported... without an admin/ prefix :)

I would say the best option to throw out all admin-panel related routes to a separated yaml and import it in the main routing file. Therefore we would have 3 imports in a routing.yaml: new sylius_admin_order_creation: (or sth similar), sylius_admin_order_creation_ajax and fos_js_routing.

What do you think about it? Are you willing to introduce these changes? 🖖

htaoufikallah commented 3 years ago

@Zales0123 I think that this PR should be reconsidered to support the new feature (%sylius_admin.path_name% ) in 1.8