-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
the idea was for e.g. vendors using So it's a feature .. kinda :) |
Does this have to be at the |
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
},
]); |
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 the OptionsResolver
. I agree it shouldn't be part of the interface.
This was about documentation only :) (for IDEs mainly) |
should be target 4.2 |
9a422cd
to
adc7e6a
Compare
…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()
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!)