Conversation
| * type?: string, | ||
| * virtual_field?: bool | ||
| * }&array<string, mixed>|array<empty, empty> | ||
| * }|array<empty, empty> |
There was a problem hiding this comment.
If we don't remove this one it fails ?
|
Copy of my last response in #7099
Yes, but someone could use his own persistence or his own FieldDescription with more features (and options).
Some options are specific to only some FieldDescription type ; for instance or which only related to the another example
I'm sure I can find others options used for specific FieldDescription types.
I just follow the way we're doing for all the existing templates. |
|
How do we move forward? This is blocking the master branch |
As I said, for me the What If I wanted to create my own type with a |
|
what kind of type? We are trying to close API and restrict things, if we need options we can add them, but not leave this open to anything. Even if we need to add an option for adding options I'd rather do this than mix them with all the options. |
There is at least I agree we're trying to close API, but the field description is something open by pattern since custom type are allowed: I could create my own type Here, the developper will have two issues:
The issue here is that we have generic options but also specific (to only some field description types) ones and we pass them the same way. If something should be in the FieldDescriptionsOption, it should only be the generic options for all the possible types. Then we add |
|
To me the right approach would be to do as we do with form that has a separated options: SonataAdminBundle/src/Form/FormMapper.php Line 80 in a8731dc and filters: SonataAdminBundle/src/Datagrid/DatagridMapper.php Lines 78 to 85 in a8731dc |
That's something worth considering, but for now, the array should accept any options, like it was before. And an issue could be opened for tackle that problem. |
It could something to start with, keeping in mind that
Personally, when using these methods, I never used the second array of option and put all my options directly in the first array because I never understood which options should be in the first array, and which should be in the second one. But we should indeed
This seems to need a lot of refacto, BC-break, reflexions and discussions so I agree with jordisala, the quickest way to solve the issue is to remove |
Follow-up of #7099 (review) to merge to master is not affected.