Skip to content

Add better support for Twig coding conventions #1990

@elnur

Description

@elnur

As far as I understand, it's idiomatic to use underscored variables and functions in Twig:

{{ foo_bar }}
{{ foo|number_format }}

If that's the case, Twig should also support accessing object properties with this style:

{{ that_user.full_name }}

But currently, it fails and forces me to use camel case:

{{ that_user.fullName }}

So I'm forced to mix both PHP/Symfony and Twig conventions in my templates and I don't like it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions