FriendsOfSylius / SyliusImportExportPlugin

Sylius plugin to import / export data
MIT License
118 stars 82 forks source link

Export keys need to be defined twice #65

Closed stefandoorn closed 6 years ago

stefandoorn commented 6 years ago

Per example, the keys (id, code & enabled) are defined twice. What's the reason to do this? And could we maybe extract them away in another service that's managing the keys?

Further, shouldn't they be case sensitive? Field names can also have different casing.

services:
    sylius.exporter.countries.csv:
        class: FriendsOfSylius\SyliusImportExportPlugin\Exporter\ResourceExporter
        arguments:
            - "@sylius.exporter.csv_writer"
            - "@sylius.exporter.pluginpool.countries"
            - ["Id", "Code", "Enabled"]
        tags:
            - { name: sylius.exporter, type: country, format: csv }

    sylius.exporter.pluginpool.countries:
        class: FriendsOfSylius\SyliusImportExportPlugin\Exporter\Plugin\PluginPool
        arguments:
            - ["@sylius.exporter.plugin.resource.country"]
            - ["Id", "Code" ,"Enabled"]

    sylius.exporter.plugin.resource.countries:
        class: FriendsOfSylius\SyliusImportExportPlugin\Exporter\Plugin\ResourcePlugin
        arguments:
            - "@sylius.repository.country"
            - "@property_accessor"
            - "@doctrine.orm.entity_manager"
stefandoorn commented 6 years ago

Ah, in the pluginpool it's about the field names in the resource, in the csv part it's the heading names.

lsmith77 commented 6 years ago

so we can close this?

stefandoorn commented 6 years ago

I think some more clear documentation around it could be useful.

Op 31 mrt. 2018 om 18:19 heeft Lukas Kahwe Smith notifications@github.com het volgende geschreven:

so we can close this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.