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

[Form] Deprecate passing false as $label to ChoiceListFactoryInterface#33074

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

@vudaltsov
Copy link
Contributor

QA
Branch?4.4
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRn/a

Replaces#32955 , see#32955 (comment)

@nicolas-grekasnicolas-grekas added this to thenext milestoneAug 9, 2019
@nicolas-grekas
Copy link
Member

Passing false looks fine to me. I'm not sure we should do this for the sake of adding type hints. Every deprecation adds to the migration process, we already have a lot of them. I'd prefer updating the docblock and mention that false is legal (and explain the purpose of it of course.)

vudaltsov reacted with thumbs up emoji

@vudaltsov
Copy link
ContributorAuthor

Okay, I agree, this went too far :)
I will fix the typehint in this PR and will target 3.4, ok? (To avoid creating another one)

@Tobion
Copy link
Contributor

Tobion commentedAug 11, 2019
edited
Loading

Passing false looks fine to me. I'm not sure we should do this for the sake of adding type hints. Every deprecation adds to the migration process, we already have a lot of them.

I don't think anyone will be affected by this. Poeple use the option and are unlikely to have changed the implementation. Otherwise I would also say it's not worth it. But currently there are two ways to do the same thing: passing false and passing a callable that returns false. And passing false directly violates the interface. So either we need to break BC by changing the interface or we need to do this here. So to me, this PR is the better solution.

@vudaltsov
Copy link
ContributorAuthor

Then let's finish this!@yceruto , I've just committed what you proposed. Did I get you right?

@vudaltsov
Copy link
ContributorAuthor

@yceruto , thanx, done. Also added tests to make sure the deprecation is triggered by default.

@nicolas-grekas
Copy link
Member

This looks clumsy. I'm for updating the type annotation and declare it ascallable|false|null, with proper runtime validation that throws a TypeError when appropriate.

@yceruto
Copy link
Member

This looks clumsy. I'm for updating the type annotation and declare it as callable|false|null, with proper runtime validation that throws a TypeError when appropriate.

Yes, I agree it could be the simpler variant.

nicolas-grekas added a commit that referenced this pull requestAug 13, 2019
…teView $label argument (vudaltsov)This PR was merged into the 3.4 branch.Discussion----------[Form] Add bool type to ChoiceListFactoryInterface::createView $label argument| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | n/a| License       | MIT| Doc PR        | n/aReplaces#33074Ping@nicolas-grekas ,@Tobion ,@yceruto .Commits-------8f5d1ca Add false type to ChoiceListFactoryInterface::createView $label argument
@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

@ycerutoycerutoyceruto requested changes

@xabbuhxabbuhAwaiting requested review from xabbuhxabbuh is a code owner

+1 more reviewer

@TobionTobionTobion left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

5 participants

@vudaltsov@nicolas-grekas@Tobion@yceruto@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp