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] Add $triggerDeprecation arg to offsetGet() method in Options interface#31799

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

Closed

Conversation

@yceruto
Copy link
Member

QA
Branch?master
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

Ref:#28878

@yceruto
Copy link
MemberAuthor

yceruto commentedJun 2, 2019
edited
Loading

We lack a deprecation notice in 4.4 :/ this is a special case.

I thinkDebugClassLoader could do the job and trigger the auto-deprecation notice when the arguments defined in the@method annotation don't match the arguments of the real method, WDYT?

@yceruto
Copy link
MemberAuthor

yceruto commentedJun 2, 2019
edited
Loading

Or at least trigger only if the number of arguments in the real method is less than the ones defined in@method annotation

@ycerutoycerutoforce-pushed theoptions_offsetGet_signature branch fromdc55eea tob8cd9baCompareJune 3, 2019 02:56
@ycerutoycerutoforce-pushed theoptions_offsetGet_signature branch fromb8cd9ba tod983fd8CompareJune 3, 2019 11:23
@nicolas-grekas
Copy link
Member

I agreeDebugClassLoader should be able to trigger a deprecation notice here. Would you be able to have a look?

@nicolas-grekasnicolas-grekas added this to thenext milestoneJun 3, 2019
@nicolas-grekas
Copy link
Member

(don't forget the UPGRADE files :) )

@yceruto
Copy link
MemberAuthor

I agree DebugClassLoader should be able to trigger a deprecation notice here. Would you be able to have a look?

Yes, I think so :)
Next, I need a way to get rid of that deprecation, thoughts?

@nicolas-grekas
Copy link
Member

Adding@param bool $triggerDeprecation works already for getting rid of the deprecation I think. - It means "I know I should add this argument but I can't for BC"

yceruto reacted with thumbs up emoji

@nicolas-grekas
Copy link
Member

Actually I'm proposing to remove the argument from the interface in#31950
I fail to understand why it should be on the interface.

* @throws NoSuchOptionException If the option is not set
* @throws InvalidOptionsException If the option doesn't fulfill the
* specified validation rules
* @throws OptionDefinitionException If there is a cyclic dependency between

Choose a reason for hiding this comment

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

all this is not a minor change: was it implicitly the definition of the contracts of the interface before?
also, does it make sense to have all this at the abstraction level? or are they implementation details of OptionsResolver, the implementation?

@ycerutoyceruto closed thisJun 8, 2019
@ycerutoyceruto deleted the options_offsetGet_signature branchJune 8, 2019 12:41
@nicolas-grekasnicolas-grekas modified the milestones:next,4.4Oct 27, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

3 participants

@yceruto@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp