Skip to content

Pass option by_reference in case we're using AdminType#438

Merged
VincentLanglet merged 1 commit into
sonata-project:3.xfrom
VincentLanglet:formContractor
Oct 8, 2020
Merged

Pass option by_reference in case we're using AdminType#438
VincentLanglet merged 1 commit into
sonata-project:3.xfrom
VincentLanglet:formContractor

Conversation

@VincentLanglet
Copy link
Copy Markdown
Member

Subject

Same as sonata-project/SonataDoctrineORMAdminBundle#1142

Changelog

### Added
- `FormContractor::getDefaultOptions()` now pass `by_reference` from `CollectionType` to `AdminType`

@VincentLanglet VincentLanglet requested a review from a team October 4, 2020 15:10
@VincentLanglet
Copy link
Copy Markdown
Member Author

Please review @sonata-project/contributors

@VincentLanglet VincentLanglet requested a review from a team October 8, 2020 07:07
public function getDefaultOptions($type, FieldDescriptionInterface $fieldDescription)
{
// NEXT_MAJOR: Remove this line and update the function signature.
$formOptions = \func_get_args()[2] ?? [];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@core23 The phpdoc is inherited from the interface getDefaultOptions.

I prefer to add the phpdoc in the interface in the SonataAdmin PR https://github.com/sonata-project/SonataAdminBundle/pull/6438/files

@VincentLanglet VincentLanglet merged commit d676d74 into sonata-project:3.x Oct 8, 2020
@VincentLanglet VincentLanglet deleted the formContractor branch October 8, 2020 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants