Skip to content

Remove dependency on laminas-escaper #26

@pine3ree

Description

@pine3ree

The plates renderer factory automatically registers the EscaperExtension with the plates engine.

As suggested in the class commentary, in order to use different helpers we have to use the provided escaper extension FQCN as a container alias for our own or third party implementation, which feels a bit strange.

Another way is to write our own factory that discard the automatic injection of the extension

In any case the laminas-escaper package is still listed as a composer dependency and gets downloaded even if not actually used,

Wouldn't it be better to just mark laminas-escaper as a suggested package and document its availability through configuration like any other extension? We could also add a escaper class existence test inside the extension constructor, and throw an exception if missing with a message suggesting to "require" the laminas-escaper composer package

kind regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions