10BC0 Code duplication among Twig extensions and Templating helpers · Issue #2999 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Code duplication among Twig extensions and Templating helpers #2999

@jmikola

Description

@jmikola

I was looking at the templating helper classes in FrameworkBundle and SecurityBundle. There appears to be a fair about of code duplication between these classes and their Twig extension counterparts.

I realize helpers extend a base class, as do Twig extensions, so separate classes must continue to exist; however, we could use object composition to have the Twig extensions expose the helper's methods to Twig. In some cases, this might require an intermediary wrapping method in the helper.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0