Skip to content

fix: handle closure labels in nav validation#19

Merged
shavonn merged 1 commit into
mainfrom
fix/label-closure-validation
Mar 30, 2026
Merged

fix: handle closure labels in nav validation#19
shavonn merged 1 commit into
mainfrom
fix/label-closure-validation

Conversation

@shavonn
Copy link
Copy Markdown
Contributor

@shavonn shavonn commented Mar 30, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 30, 2026 19:17
@shavonn shavonn merged commit f74b7ee into main Mar 30, 2026
22 checks passed
@shavonn shavonn deleted the fix/label-closure-validation branch March 30, 2026 19:18
@github-actions github-actions Bot mentioned this pull request Mar 30, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the navigation:validate command so it can process navigation items whose label is a PHP Closure (dynamic labels) without crashing, and adds a regression test to cover that scenario.

Changes:

  • Treat Closure labels as a safe placeholder string when constructing the validation “path” output.
  • Add a feature test ensuring closure labels don’t cause navigation:validate to error.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Commands/ValidateNavigationCommand.php Prevents string interpolation on Closure labels by substituting a placeholder label for path construction.
tests/Feature/ValidateCommandTest.php Adds a regression test covering closure-based labels in navigation config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants