Skip to content

[OptionsResolver] Fixed explicitly ignores a depreciation #28968

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
Oct 25, 2018

Conversation

yceruto
Copy link
Member

@yceruto yceruto commented Oct 24, 2018

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #28860 (comment)
License MIT
Doc PR -

When a deprecated option with default value was resolved (the first time it's called) in this case through a lazy evaluation, the default resolution process takes the resolved value and here should also trigger only if the option was provided by the user or is being called from a lazy evaluation, otherwise ignore.

@yceruto
Copy link
Member Author

yceruto commented Oct 24, 2018

@ro0NL could you please check that this solves the problem?

Copy link
Contributor

@ro0NL ro0NL left a comment

Choose a reason for hiding this comment

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

👌

@fabpot
Copy link
Member

fabpot commented Oct 25, 2018

Thank you @yceruto.

@fabpot fabpot merged commit 8398947 into symfony:master Oct 25, 2018
fabpot added a commit that referenced this pull request Oct 25, 2018
…(yceruto)

This PR was merged into the 4.2-dev branch.

Discussion
----------

[OptionsResolver] Fixed explicitly ignores a depreciation

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #28860 (comment)
| License       | MIT
| Doc PR        | -

When a deprecated option with default value was resolved (the first time it's called) in this case through a lazy evaluation, [the default resolution process](https://github.com/symfony/symfony/blob/8398947c9c1c1266aad0bea773d0b524e0d81643/src/Symfony/Component/OptionsResolver/OptionsResolver.php#L771-L773) takes the resolved value and here should also trigger only if the option was provided by the user or is being called from a lazy evaluation, otherwise ignore.

Commits
-------

8398947 Fixed explicitly ignores a depreciation
@yceruto yceruto deleted the fix_trigger_deprecation branch October 25, 2018 11:10
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.

5 participants