Converter config only really works with `GenericConverter`
jdreesen opened this issue · 2 comments
The bundle config currently allows you to specify a custom converter via neusta_converter.converter.<name>.converter: <class-name>
, but this only works if it has exactly the same constructor parameters as the GenericConverter
, which is not the case with the StrategicConverter
.
One solution would be to introduce a new level for the converter type and move the converter-specific configuration below it.
So, instead of neusta_converter.converter.<name>...
it would be neusta_converter.converter.<name>.<type>...
.
What is the argument against extending the configuration to something e.g.:
neusta_converter.strategy_converter.<name>
AFAIK there will be no more other types of conversions but:
- using Factory and Populators
- find a strategy (which is perhaps using Factory and Populators)
Wouldn't that make backward compatibility easier and nevertheless allow strategy converters?
I wouldn't be so sure that there will only ever be exactly these two converter types.
I would also like to have the option of extending the configuration from other bundles or the project.
The proposal in #41 is not a big change in the (YAML) config, and projects should be able to adapt quickly.