Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[OptionsResolver] fix adding $triggerDeprecation to Options::offsetGet()#31950
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ro0NL commentedJun 8, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
the idea was for e.g. vendors using So it's a feature .. kinda :) |
nicolas-grekas commentedJun 8, 2019
Does this have to be at the |
ro0NL commentedJun 8, 2019
I think yes, because that's what you typehint for: $resolver->setDefaults(['a' =>function (Options$options) {$b =$options->offsetGet('b',false);// never triggers$c =$options['c'];// always triggers },]); |
yceruto left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yes, the new argument is an implementation detail of theOptionsResolver. I agree it shouldn't be part of the interface.
yceruto commentedJun 8, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This was about documentation only :) (for IDEs mainly) |
yceruto commentedJun 8, 2019
should be target 4.2 |
…ons::offsetGet() (nicolas-grekas)This PR was submitted for the 4.3 branch but it was merged into the 4.2 branch instead (closes#31950).Discussion----------[OptionsResolver] fix adding $triggerDeprecation to Options::offsetGet()| Q | A| ------------- | ---| Branch? | 4.3| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -This has been added by@yceruto in#28878 but it doesn't make sense to me: the interface has no concept if deprecation (`OptionsResolver` has!)Commits-------adc7e6a [OptionsResolver] fix adding $triggerDeprecation to Options::offsetGet()
Uh oh!
There was an error while loading.Please reload this page.
This has been added by@yceruto in#28878 but it doesn't make sense to me: the interface has no concept if deprecation (
OptionsResolverhas!)