-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Access to CollectionType options in AdminType #6438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -130,7 +130,10 @@ public function add($name, $type = null, array $options = [], array $fieldDescri | |
| $name = $fieldDescription->getName(); | ||
|
|
||
| // Note that the builder var is actually the formContractor: | ||
| $options = array_replace_recursive($this->builder->getDefaultOptions($type, $fieldDescription) ?? [], $options); | ||
| $options = array_replace_recursive( | ||
| $this->builder->getDefaultOptions($type, $fieldDescription, $options), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably I'm missing something, but why do we need to pass the form options to the builder (persistence bundles) if we already have them here? Apparently https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/1142/files this just adds the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because they are transformed. From To (And multiple others modifications) And the options passed are not always the same ; the depends on the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I remember some unintended behavior regarding these options (#6078).
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure to understand. ^^'
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry. The comment is regarding the modifications you've mentioned about the options.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reasoning seems fine to me.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand @phansys. To me, the only NEXT_MAJOR comment needed is https://github.com/sonata-project/SonataDoctrineORMAdminBundle/blob/3.x/src/Builder/FormContractor.php#L101 The 3rd argument will always be used from now, so I don't understand why you want to deprecate it ?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'm not saying we should deprecate the argument, please re-read my comment:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sorry, didn't see that the call to I think then we should just trigger a deprecation if the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The getDefaultOptions is implemented in persistence bundle, so I can't do it in this SonataAdmin PR. But I can create PR on persistence bundle then. |
||
| $options | ||
| ); | ||
|
|
||
| // be compatible with mopa if not installed, avoid generating an exception for invalid option | ||
| // force the default to false ... | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.