Do not run Generic.PHP.DisallowShortOpenTag on .yml files

Created on 11 July 2025, 3 days ago

Problem/Motivation

The sniff Generic.PHP.DisallowShortOpenTag incorrectly complains when finding <?xml in embeded .yml data structures. This rule could be excluded from all .yml files as it is not needed there.

Steps to reproduce

Use test .yml file containing

data: "<?xml anything"?>

Here is the actual file that caused the question in the first place, raised in this slack thread

Proposed resolution

Add exclude-pattern to skip .yml files for this sniff

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

8.3

Component

Coder Sniffer

Created by

🇬🇧United Kingdom jonathan1055

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024