Skip to content

Fix "payload" usage #9581

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2018
Merged

Fix "payload" usage #9581

merged 1 commit into from
Apr 16, 2018

Conversation

liviubalan
Copy link
Contributor

No description provided.

@javiereguiluz javiereguiluz changed the base branch from 3.4 to 2.7 April 16, 2018 09:00
@javiereguiluz
Copy link
Member

Nice catch! We merged it on 2.7 branch. Thanks.

@javiereguiluz javiereguiluz merged commit f69f68f into symfony:2.7 Apr 16, 2018
javiereguiluz added a commit that referenced this pull request Apr 16, 2018
This PR was submitted for the 3.4 branch but it was merged into the 2.7 branch instead (closes #9581).

Discussion
----------

Fix "payload" usage

<!--

If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/roadmap for the list of maintained branches).

If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `master` for features of unreleased versions).

-->

Commits
-------

f69f68f Fix "payload" usage
javiereguiluz added a commit that referenced this pull request Apr 18, 2018
This PR was merged into the 2.7 branch.

Discussion
----------

Updated a Twig example

After merging #9581 I realized that we could improve the example using modern Twig code.

Commits
-------

b1659f1 Updated a Twig example
@@ -155,8 +155,8 @@ so that the severity is added as an additional HTML class:
{%- if errors|length > 0 -%}
<ul>
{%- for error in errors -%}
{% if error.cause.constraint.payload.severity is defined %}
{% set severity = error.cause.constraint.payload.severity %}
{% if error.constraint.payload.severity is defined %}
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 like the wrong fix to me. The previous paragraph is talking about the form_errors block. Thus, we can assume that errors is an array of FormErrror instances where there is no $constraint property, but indeed a $cause.

Copy link
Member

Choose a reason for hiding this comment

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

see #9631

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants