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] fix "prototype" not required when parent form is not required#18317

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
fabpot merged 1 commit intosymfony:2.3fromHeahDude:bug-prototype_required
Apr 5, 2016

Conversation

@HeahDude
Copy link
Contributor

QA
Branch?2.3+
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#18311
LicenseMIT
Doc PR~


if ($view->parent && !$view->parent->vars['required']) {
$view->vars['prototype']->vars['required'] =false;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

May be a better solution:

$prototype =$form->getConfig()->getAttribute('prototype');$view->vars['prototype'] =$prototype->setParent($form)->createView($view);

HeahDude reacted with thumbs up emoji
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Fixed! Thanks@sergeyfedotov

@sergeyfedotov
Copy link
Contributor

@HeahDude
Copy link
ContributorAuthor

@sergeyfedotov The assertion in your last test looks wrong, "prototype" should not be required in that case, and the test is passing while it's not as expected. I don't think there is a BC break here.

@sergeyfedotov
Copy link
Contributor

Ok. I really don't know should it be interpreted as a BC break or not. But currentlyentry_options overrides the prototype options and this PR changes the behaviour.

@sergeyfedotov
Copy link
Contributor

@HeahDude
Copy link
ContributorAuthor

@sergeyfedotov Yes it is, if the parent does not override the prototype options,entry_options should do it.

@HeahDudeHeahDudeforce-pushed thebug-prototype_required branch from041c804 to7df9ca2CompareMarch 31, 2016 12:29
@HeahDude
Copy link
ContributorAuthor

Status: Ready

@xabbuh
Copy link
Member

👍

Status: Reviewed

@HeahDude
Copy link
ContributorAuthor

Note to the merger: in 2.8options option in the two tests added needs to be renamedentry_options. Thanks

@fabpot
Copy link
Member

Thank you@HeahDude.

@fabpotfabpot merged commit7df9ca2 intosymfony:2.3Apr 5, 2016
fabpot added a commit that referenced this pull requestApr 5, 2016
…t required (HeahDude)This PR was merged into the 2.3 branch.Discussion----------[Form] fix "prototype" not required when parent form is not required| Q             | A| ------------- | ---| Branch?       | 2.3+| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#18311| License       | MIT| Doc PR        | ~Commits-------7df9ca2 [Form] fix "prototype" not required when parent form is not required
@HeahDudeHeahDude deleted the bug-prototype_required branchApril 5, 2016 16:32
Tobion added a commit that referenced this pull requestApr 6, 2016
This PR was merged into the 2.3 branch.Discussion----------[Form] Remove unnecessary option assignment| Q             | A| ------------- | ---| Branch?       | 2.3| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -Option assignment is not required because the prototype inherits this option from the parent form via standard inheritance mechanism.Related pull requests:#16959,#18317Commits-------da8a197 Remove unnecessary option assignment
This was referencedApr 29, 2016
@fabpotfabpot mentioned this pull requestApr 29, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@HeahDude@sergeyfedotov@xabbuh@fabpot@webmozart@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp