teamneusta / converter-bundle

An Open Source implementation of the Converter & Populator pattern
MIT License
5 stars 4 forks source link

Extendable Configuration #79

Open mike4git opened 1 month ago

mike4git commented 1 month ago

We need the Configuration of this bundle being extendable so that other bundles can add or create their specific Converters and Populators and offer them to be configured below Configuration key:

neusta_converter.

Concrete scenario

The pimcore-converter-bundle offers a LocalizedPropertyMappingPopulator which could be configured as simple as PropertyMappingPopulator.

So in the same way, it would be nice to just write in a Converter configuration:

neusta_converter:
  converter:
    my.converter:
      target: App\MyView
      properties:
        attribute1: srcAttribute1
        ...
+     localized_properties:
+       localizedAttribute1: srcLocalizedAttribute1

To allow that, a lot more things have to be prepared in converter-bundle Configurationclass.

jdreesen commented 1 month ago

I think we should use #41 as a base for this, as it already allows extending the config at certain points.