Skip to content

Recognize named Blade slot closing tags - #431

Open
shuvroroy wants to merge 1 commit into
PHPantom-dev:mainfrom
shuvroroy:fix/blade-named-slot-closers
Open

Recognize named Blade slot closing tags#431
shuvroroy wants to merge 1 commit into
PHPantom-dev:mainfrom
shuvroroy:fix/blade-named-slot-closers

Conversation

@shuvroroy

Copy link
Copy Markdown
Contributor

A named Blade slot such as <x-slot:title>Latest update</x-slot:title> was reported as a mismatched component tag. Accept the matching named closer as well as the existing bare </x-slot> spelling, while still reporting unrelated closers.

Regression tests cover tag spans and balance diagnostics for both valid spellings and invalid closers. The existing Laravel demo already exercises the named closer.

Validation: full Cargo tests, library and all-target Clippy with warnings denied, formatting, PHP syntax checks, and both demo assertion suites pass. Laravel analysis reports exactly its three intentional diagnostics. All changed executable Rust lines are covered.

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, examples/)
  • I have updated the config schema (config-schema.json)
  • I have added/updated tests to cover my changes
  • I fully understand the code that I am submitting (what it does,
    how it works, how it's organized), including any code drafted by an LLM.
  • For any prose generated by an LLM, I have proof-read and copy-edited with
    an eye towards deleting anything that is irrelevant, clarifying anything
    that is confusing, and adding details that are relevant. This includes,
    for example, commit descriptions, PR descriptions, and code comments.

Accept a named slot's matching closing tag as well as the bare x-slot
closer. Previously a valid <x-slot:title>...</x-slot:title> was diagnosed
as mismatched and its component span remained unclosed.

Cover both valid closing spellings and mismatched closers with regression
tests, and document the editor-visible fix in the changelog.
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@shuvroroy
shuvroroy marked this pull request as ready for review September 9, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants