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

Fix multiSelect ChoiceQuestion when answers have spaces#32503

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
chalasr merged 1 commit intosymfony:3.4fromIceMaD:fix_32502
Jul 24, 2019

Conversation

@IceMaD
Copy link
Contributor

@IceMaDIceMaD commentedJul 11, 2019
edited by chalasr
Loading

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#32502
LicenseMIT
Doc PRN/A

Probleme is explained in the issue

@Simperfit
Copy link
Contributor

If this is really something we want to do, it should be deprecated before doing so, because it will break existing command that rely on this.

@nicolas-grekasnicolas-grekas added this to the4.3 milestoneJul 12, 2019
@chalasr
Copy link
Member

Any bugfix might break someone's behavior.
I think that this qualifies as a bug, and that no one reported it because usually people rely on keys for choosing multi-words answers.

This should apply to the 3.4 branch. And trimming should be disabled conditionally as of#31626 (4.4), we missed this part.

@IceMaD
Copy link
ContributorAuthor

Without the trim on multiple answers, it might break cases where answers don't have spaces but user input have. Exemple :
break

Maybe set all ChoiceQuestion as Trimmable by default on 4.4 for backward compatibility ?

/**
* @dataProvider selectUseCases
*/
public function testSelectUseCases($isMiltiSelect, $answers, $expected, $message)
Copy link
Member

Choose a reason for hiding this comment

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

typoisMiltiSelect/isMultiSelect

$validator = $question->getValidator();
$actual = $validator($answer);

$this->assertEquals($actual, $expected, sprintf($message, $answer));
Copy link
Member

Choose a reason for hiding this comment

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

sprintf() seems unnecessary

@chalasr
Copy link
Member

@IceMaD yes, trimming must stay enabled by default.

Can you please rebase against the 3.4 branch and change the PR base branch accordingly?

@chalasrchalasr modified the milestones:4.3,3.4Jul 24, 2019
@chalasrchalasr removed the request for review fromxabbuhJuly 24, 2019 14:47
@chalasr
Copy link
Member

Thank you@IceMaD.

@chalasrchalasr merged commit9104ef1 intosymfony:3.4Jul 24, 2019
chalasr pushed a commit that referenced this pull requestJul 24, 2019
…ceMaD)This PR was merged into the 3.4 branch.Discussion----------Fix multiSelect ChoiceQuestion when answers have spaces| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#32502| License       | MIT| Doc PR        | N/AProbleme is explained in the issueCommits-------9104ef1 Fix multiSelect ChoiceQuestion when answers have spaces
@chalasr
Copy link
Member

And thank you for contributing to Symfony for the first time. Well done, congratz :)

This was referencedJul 27, 2019
@fabpotfabpot mentioned this pull requestJul 28, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

6 participants

@IceMaD@Simperfit@chalasr@nicolas-grekas@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp