Skip to content

Add the WayfinderIgnore attribute - #310

Merged
joetannenbaum merged 4 commits into
nextfrom
ignore-attribute
Aug 22, 2026
Merged

Add the WayfinderIgnore attribute#310
joetannenbaum merged 4 commits into
nextfrom
ignore-attribute

Conversation

@joetannenbaum

Copy link
Copy Markdown
Collaborator

Some of what Wayfinder can see should not reach the browser. Marking a declaration with #[WayfinderIgnore] leaves it out of the generated files: a controller class or action, along with its route helper, form variant, page type and request type, a model, an enum or one of its cases, a broadcast event or channel, and a model's accessors and relations. An array key cannot take an attribute, so a @wayfinder-ignore comment covers page props, resource payloads and validation rules.

Passing unless or when keeps or drops the declaration based on a config key or a callable, which covers what belongs in local builds only, such as a fake source provider. Generation runs per build, so each environment gets its own answer, and a condition that cannot be read leaves the declaration out rather than shipping it.

Attributes from other packages and extra comment tags can be listed in config, and the ignore config is folded into the analysis cache key so a change to it is never served from cache.

@joetannenbaum

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

Co-authored-by: joetannenbaum <2702148+joetannenbaum@users.noreply.github.com>

Copilot AI commented Aug 21, 2026

Copy link
Copy Markdown

@copilot resolve the merge conflicts in this pull request

Resolved in 4f14e24 by merging next into this branch and fixing the conflict in composer.json while preserving the upstream GenerateCommand merge result.

@joetannenbaum
joetannenbaum marked this pull request as draft August 21, 2026 22:10
@joetannenbaum
joetannenbaum marked this pull request as ready for review August 22, 2026 02:50
@joetannenbaum
joetannenbaum merged commit c4a4c02 into next Aug 22, 2026
9 checks passed
@joetannenbaum
joetannenbaum deleted the ignore-attribute branch August 22, 2026 02:54
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