craue / CraueConfigBundle

Database-stored settings made available via a service for your Symfony project.
MIT License
173 stars 35 forks source link

Possibility to have settings of different types #37

Open Zoopme opened 7 years ago

Zoopme commented 7 years ago

Hello,

This bundle allows creating a custom entity for settings which makes it possible to override data type.

However, it does not seem possible to use more than one data type in an application using this bundle.

I would be very helpful if one was able to create several settings of different types (eg. setting1 => date, setting2 => string of 255 char, setting3 => text rendered in a textarea, etc.).

So it seems that instead of creating a custom entity, we would be looking at having a field containing the datatype of the parameter.

Regards,

craue commented 7 years ago

If you want (or someone else wants) to work on such feature, feel free to create a PR. 😏

db306 commented 6 years ago

Perhaps i'll do it. What about adding a colon 'type' and move from varchar255 to long text. We could support dates, ints, floats, serialized arrays, etc. It would require modifying the getter setter to adapt every time to the set variable. Seems feasible, what do you think about this @craue ?

neok commented 5 years ago

any updates?

craue commented 5 years ago

The bundle probably won't support different data types (see #5, #29).