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] Trigger deprecation only if the option is used#28878
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
c19026d tod52af6cCompareyceruto commentedOct 15, 2018 • 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.
There is still a desicion to make here to complete this patch:
See example inhttps://github.com/symfony/symfony/pull/28860/files#diff-c6198934d4f35bc102ff362d40b71285R40 WDYT about the@ro0NL's idea? thoughts? |
d57f826 to06ca456Compareaa247e2 todb8a3dbCompare1b1334f to44870efComparenicolas-grekas commentedOct 20, 2018
looks like this is the way to go, isn't it? |
yceruto commentedOct 21, 2018
It should be ready now. |
src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
c47fd5f to6c191b7CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
6c191b7 toe955dbdComparefabpot commentedOct 24, 2018
Thank you@yceruto. |
…s used (yceruto)This PR was merged into the 4.2-dev branch.Discussion----------[OptionsResolver] Trigger deprecation only if the option is used| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#28848| License | MIT| Doc PR |symfony/symfony-docs#10496It's true that showing a deprecation message when the option is not used is a bit annoying and it would be heavy to get rid of it.Now, a deprecated option is triggered only when it's provided by the user or each time is being called from a lazy evaluation (except for deprecations based on the value, they're triggered only when provided by the user).Commits-------1af23c9 [OptionsResolver] Trigger deprecation only if the option is used
This PR was merged into the 4.2-dev branch.Discussion----------[Form] Deprecate TimezoneType regions option| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | yes| Tests pass? | yes <!-- please add some, will be required by reviewers -->| Fixed tickets |#28848| License | MIT| Doc PR | symfony/symfony-docs#... <!-- required for new features -->I know i've added this option myself in 4.1, but given my recent development for#28624 i realized it's an opinionated feaure, which can/should be solved on user-side (`choice_filter/choice_loader` and/or `group_by`).- blocks translations as we dont have them (see#28831)- blocks possibility of switching to Intl zones which doesnt really have this filter feature (see#28836)~While at it, i solved a few issues with `OptionsResolver` that is able to deprecate options as of 4.2 also.~ Fixed in#28878- when resolved trigger the deprecation- allow to opt-out from triggering the deprecation- dont trigger deprecation for default values (only given ones)Commits-------5cb532d [Form] Deprecate TimezoneType regions option
…on (yceruto)This PR was merged into the master branch.Discussion----------[OptionsResolver] Add some notes about trigger deprecationUpdates according tosymfony/symfony#28878Commits-------bb4861b Add some notes about trigger deprecation
…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()
…ruto)This PR was squashed before being merged into the 4.2 branch (closes#11704).Discussion----------[OptionsResolver] Add note about deprecated optionsMissing piece related tosymfony/symfony#28878Commits-------aaac426 [OptionsResolver] Add note about deprecated options
Uh oh!
There was an error while loading.Please reload this page.
It's true that showing a deprecation message when the option is not used is a bit annoying and it would be heavy to get rid of it.
Now, a deprecated option is triggered only when it's provided by the user or each time is being called from a lazy evaluation (except for deprecations based on the value, they're triggered only when provided by the user).