Skip to content

Conversation

@yceruto
Copy link
Member

@yceruto yceruto commented Jun 8, 2019

Missing piece related to symfony/symfony#28878

@yceruto
Copy link
Member Author

yceruto commented Jun 8, 2019

This is the use case for this note:

$resolver->setDefaults([
    'foo' => null,
    'bar' => function (Options $options) {
        // needed to keep BC,
        // and do not use $options['foo'] here, it'll trigger the deprecation
        return $options->offsetGet('foo', false); // does not trigger the deprecation
    },
]);
$resolver->setDeprecated('foo', 'The "foo" option is deprecated, use "bar" instead.');

@javiereguiluz javiereguiluz merged commit aaac426 into symfony:4.2 Jun 11, 2019
javiereguiluz added a commit that referenced this pull request Jun 11, 2019
…ruto)

This PR was squashed before being merged into the 4.2 branch (closes #11704).

Discussion
----------

[OptionsResolver] Add note about deprecated options

Missing piece related to symfony/symfony#28878

Commits
-------

aaac426 [OptionsResolver] Add note about deprecated options
@javiereguiluz
Copy link
Member

Thanks Yonel!

@yceruto yceruto deleted the patch-5 branch June 11, 2019 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants