Skip to content

Commit

Permalink
minor #18456 [Form] Remove unnecessary option assignment (sergeyfedotov)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Remove unnecessary option assignment

| Q             | A
| ------------- | ---
| Branch?       | 2.3
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Option assignment is not required because the prototype inherits this option from the parent form via standard inheritance mechanism.

Related pull requests: #16959, #18317

Commits
-------

da8a197 Remove unnecessary option assignment
  • Loading branch information
Tobion committed Apr 6, 2016
2 parents 192e821 + da8a197 commit e251e36
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public function buildForm(FormBuilderInterface $builder, array $options)
{
if ($options['allow_add'] && $options['prototype']) {
$prototype = $builder->create($options['prototype_name'], $options['type'], array_replace(array(
'required' => $options['required'],
'label' => $options['prototype_name'].'label__',
), $options['options']));
$builder->setAttribute('prototype', $prototype->getForm());
Expand Down

0 comments on commit e251e36

Please sign in to comment.