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] The trace of form errors is now displayed in the profiler#12054

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
webmozart merged 1 commit intosymfony:masterfromwebmozart:transformation-failure
Sep 30, 2014

Conversation

@webmozart
Copy link
Contributor

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

This is a follow-up PR for#12052. With this change, the full trace of form errors is now displayed in the web debugger:

error

If a violation was caused by a TransformationFailedException, the exception is now accessible through thegetCause() method of the violation. Additionally, you can accessForm::getTransformationFailure() to retrieve the exception.

Copy link
Member

Choose a reason for hiding this comment

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

this looks weird

@stof
Copy link
Member

getTransformationFailure must be implemented in Button too

@webmozart
Copy link
ContributorAuthor

@stof done

@shoomyth
Copy link

What do you think about deprecatingisSynchronized() and addinghasTransformationFailure() ?
Or renaming toisDataSynchronized(), because it's not obvious what is exactly synchronized in form

@webmozart
Copy link
ContributorAuthor

@shoomythhasTransformationFailure() is a good suggestion actually! I'll look into it.

@webmozart
Copy link
ContributorAuthor

ping @symfony/deciders

I'd like to merge this PR today.

@fabpot
Copy link
Member

My only concern is the "yet another BC break in the Form component". I think that having interfaces that change in every single Symfony version do not help. Not having those interfaces in the first place would be in fact better.

@stof
Copy link
Member

@fabpot we have 2 implementations of the interface in core. And removing it would force breaking BC in all form types (as they typehint the FormInterface inbuildView andfinishView).
If we can find a different way to handle buttons without relying on the interface, I would be in favor of dropping it in 3.0 though.

But the interface is meant for consuming it in userland, not for implementing it. I doubt anyone is crazy enough to reimplement the FormInterface in a different way in their project, and only these crazy people would be affected by this BC break.

@webmozart
Copy link
ContributorAuthor

But the interface is meant for consuming it in userland, not for implementing it.

Exactly. People are supposed to type-hint against the interface, not implement it. Our benefit is the flexibility to pass any implementation of the interface that we like, be itForm,Button or any other (some more will probably come in 2.7, because I think we can improve performance if we use simpler implementations thanForm for simple fields).

@webmozartwebmozartforce-pushed thetransformation-failure branch 2 times, most recently from81b4121 tocd4b3f8CompareSeptember 30, 2014 21:05
webmozart added a commit that referenced this pull requestSep 30, 2014
…onstraint violation (webmozart)This PR was merged into the 2.6-dev branch.Discussion----------[Validator] Made it possible to store the cause of a constraint violation| Q             | A| ------------- | ---| Bug fix?      | no| New feature?  | yes| BC breaks?    | yes| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | TODOThis change makes it possible to store the cause of a violation (e.g. an exception). This way it is possible to follow the trace of violations caused by exceptions up to their root.```phptry {    // ...} catch (Exception $e) {    $this->context->buildViolation('Error!')        ->setCause($e)        ->addViolation();}```This is one step to solve#5607. See#12054.Commits-------499eeb4 [Validator] Made it possible to store the cause of a constraint violation
@webmozartwebmozart merged commit8dbe258 intosymfony:masterSep 30, 2014
webmozart added a commit that referenced this pull requestSep 30, 2014
…e profiler (webmozart)This PR was merged into the 2.6-dev branch.Discussion----------[Form] The trace of form errors is now displayed in the profiler| Q             | A| ------------- | ---| Bug fix?      | no| New feature?  | yes| BC breaks?    | yes| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#5607| License       | MIT| Doc PR        | -This is a follow-up PR for#12052. With this change, the full trace of form errors is now displayed in the web debugger:![error](https://cloud.githubusercontent.com/assets/176399/4419637/85facd14-456d-11e4-8c70-0e8802a586ec.png)If a violation was caused by a TransformationFailedException, the exception is now accessible through the `getCause()` method of the violation. Additionally, you can access `Form::getTransformationFailure()` to retrieve the exception.Commits-------8dbe258 [Form] The trace of form errors is now displayed in the profiler
@webmozartwebmozart deleted the transformation-failure branchOctober 22, 2014 17:21
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@webmozart@stof@shoomyth@fabpot@romainneutron

[8]ページ先頭

©2009-2025 Movatter.jp