Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
nicolas-grekas merged 1 commit intosymfony:4.2fromnicolas-grekas:opt-no-deprec
Jun 9, 2019

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekasnicolas-grekas commentedJun 8, 2019
edited
Loading

QA
Branch?4.2
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
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!)

@ro0NL
Copy link
Contributor

ro0NL commentedJun 8, 2019
edited
Loading

the idea was for e.g. vendors usingOptionsResolver to opt-out from end-user deprecations themselves, i.e. the same reason why SF needs it.

So it's a feature .. kinda :)

@nicolas-grekas
Copy link
MemberAuthor

Does this have to be at theOptions level? Because sure, it also exists onOptionsResolver and it makes sense there.

@ro0NL
Copy link
Contributor

Does this have to be at the Options level?

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    },]);

Copy link
Member

@ycerutoyceruto left a 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
Copy link
Member

yceruto commentedJun 8, 2019
edited
Loading

This was about documentation only :) (for IDEs mainly)

@yceruto
Copy link
Member

should be target 4.2

@nicolas-grekasnicolas-grekas modified the milestones:4.3,4.2Jun 9, 2019
@nicolas-grekasnicolas-grekas changed the base branch from4.3 to4.2June 9, 2019 16:15
@nicolas-grekasnicolas-grekas merged commitadc7e6a intosymfony:4.2Jun 9, 2019
nicolas-grekas added a commit that referenced this pull requestJun 9, 2019
…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()
@nicolas-grekasnicolas-grekas deleted the opt-no-deprec branchJune 18, 2019 07:23
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ycerutoycerutoyceruto approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.2

Development

Successfully merging this pull request may close these issues.

4 participants

@nicolas-grekas@ro0NL@yceruto@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp