Skip to content

applyFallthroughAttributes doesn't apply when a <?php preamble is present #2040

@iamdadmin

Description

@iamdadmin

Tempest version

3.3.1 dev-main

PHP version

8.5

Operating system

Linux, macOS

Description

applyFallthroughAttributes uses /^<(?<tag>[\w-]+)/ without the m (multiline) flag which anchors to the absolute start of the viewComponent.

For x-form-view.php, x-input-view.php, x-submitview.phpand any of the other built-ins or self-created components with a<?php` preamble the regex never matches, and fallthrough attributes silently don't apply.

I've extended the Fixtures and test to demonstrate this (attached for info)

fallthrough-preamble.view.php
x-fallthrough-preamble-dynamic-test.view.php
x-fallthrough-preamble-test.view.php

FallthroughAttributesTest.php

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions