Finite
Finite copied to clipboard
[Symfony bundle configuration] different name and value for the persistence
Should be better decouple the value of the state from its name, the value could have different type from the name eg number.
eg:
draft:
type: initial
value: 100 # this is the value that will be stored into the db
properties:
deletable: true
editable: true
enabled:
type: initial
value: 200 # this is the value that will be stored into the db
properties:
printable: true
editable: true
The name could advantage the readability, instead the value could be a number. This could be very good for legacy Classes that have unreadable state code.
Big :+1: for this, as I perfectly know this use case, in legacy classes too.
Do you want to work on the implementation ?