[RFC] Services organisation
I'm working on adding importers/exporters for new models. With the current services definition organisation, it'd become a little bit messy quite fast.
Eg. for countries export/import, there are currently 9 services scattered over 7 files, including one which is 200 lines long.
Most of the time we are working on one model only, so it would make sense to group them together like:
src/Resources/config/services/country.yml: processors, plugin pools, plugins - basically those fromservices.ymlconnected to country modelsrc/Resources/config/services/country_json.yml: exporters and importers for country in JSON formatsrc/Resources/config/services/country_csv.ymlandResources/config/services/country_spreadsheet.yml: same as above
This way we can see straightly from the file structure which models are supported in which formats and it's much easier to look for services related to a certain model. In case there are too many files in services/ directory, we can then move the exporters/importers definitions in any format into a separate directory for that model.
I think this is a good idea and should make things easier to understand.
Hi @pamil, I face a simple but annoying issue with current organization: all services are up and running without any way - or I missed it? - to configure what importer / exporter you really need. In my case, I only want a custom exporter and needed to unregister the ones provided by the plugin. A better organization of services could ease the activation piece by piece of wanted functionalities. Say one want to export orders with no import feature, or import products with no import, that should be possible as we already do for routing stuff.