Skip to content

Define safer behavior when encore_entry_*_source files are missing #46

Description

@javihgil

Problem

encore_entry_css_source() and encore_entry_js_source() read asset files directly from disk with file_get_contents().

If the built files are missing, moved, or the configured public path is wrong, the current behavior is not explicit and can degrade badly at runtime.

Current evidence

  • src/Twig/Extension/EncoreEntrySourcesExtension.php concatenates file contents directly from the resolved file paths
  • there is no explicit handling for unreadable or missing files

Expected behavior

The bundle should define and document a clear behavior for missing asset files.

Suggested work

  • decide whether the helper should throw a clear exception or return an empty string
  • add tests covering missing files and wrong public paths
  • document the chosen behavior in FEATURES.md and armonic-docs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions