Skip to content

[OptionsResolver] Add note about deprecated options #11704

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

Merged
merged 1 commit into from
Jun 11, 2019

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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy