Skip to content

Better variable accessor guessing #1590

@RyanThompson

Description

@RyanThompson

Because the convention in theming is generally snake case and in PHP it is camel, consider the following:

{{ foo.bar_baz }} the getter is missed because it seems to be looking for getBar_baz()

However {{ foo.barBaz }} properly relates to getBarBaz() as far as conventions go.

It SHOULD check for getBarBaz() (snake case entire variable name) which will work in both tag cases but suggest best practices on the PHP side of things.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions