Skip to content

Commit

Permalink
feature #5050 [OptionsResolver] Fixed deprecated functionality usage …
Browse files Browse the repository at this point in the history
…(WouterJ)

This PR was merged into the 2.6 branch.

Discussion
----------

[OptionsResolver] Fixed deprecated functionality usage

| Q | A
| --- | ---
| Doc fix? | yes
| New docs? | no
| Applies to | 2.6+
| Fixed tickets | -

Commits
-------

544a676 [OptionsResolver] Fixed deprecated functionality usage
  • Loading branch information
weaverryan committed Mar 14, 2015
2 parents 0d0c795 + 544a676 commit c2f21e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cookbook/form/create_form_type_extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ it in the view::
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setOptional(array('image_path'));
$resolver->setDefined(array('image_path'));
}

/**
Expand Down
8 changes: 2 additions & 6 deletions cookbook/form/data_transformers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,8 @@ by calling ``addModelTransformer`` (or ``addViewTransformer`` - see
->setDefaults(array(
'data_class' => 'Acme\TaskBundle\Entity\Task',
))
->setRequired(array(
'em',
))
->setAllowedTypes(array(
'em' => 'Doctrine\Common\Persistence\ObjectManager',
));
->setRequired(array('em'))
->setAllowedTypes('em', 'Doctrine\Common\Persistence\ObjectManager')

// ...
}
Expand Down

0 comments on commit c2f21e6

Please sign in to comment.