Skip to content

docs(web/guides): scope route-model-binding silent-skip aside to binding=true only - #3122

Closed
wheels-bot[bot] wants to merge 1 commit into
developfrom
docs/bot-3118-docs-web-guides-route-model-binding-silently-skips
Closed

docs(web/guides): scope route-model-binding silent-skip aside to binding=true only#3122
wheels-bot[bot] wants to merge 1 commit into
developfrom
docs/bot-3118-docs-web-guides-route-model-binding-silently-skips

Conversation

@wheels-bot

@wheels-bot wheels-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

The <Aside type="tip"> at the bottom of the custom-model-class-name section incorrectly stated that the dispatcher silently skips binding when the model class doesn't exist — this is only true for convention-derived binding=true. For an explicit model name (binding="BlogPost"), Dispatch.cfc::$resolveRouteModelBinding deliberately rethrows on a resolution failure, as pinned by routeModelBindingSpec.cfc:109. As placed, the aside taught users that a typo'd binding="BlogPsot" would silently no-op, when it actually throws on first matching request.

Changes:

  • Moves the silent-skip tip to the per-resource opt-in section, scoped to binding=true convention-derived lookups where it is accurate.
  • Replaces the existing aside in the custom-model-class-name section with a caution that explains explicit binding names throw on unresolvable classes, and cross-references the binding=true silent-skip behavior for contrast.
  • Adds a changelog.d/ fragment for the fix.

Fixes #3118

…ing=true only

Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>

@wheels-bot wheels-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Wheels Bot — Reviewer

TL;DR: This PR fixes the mis-scoped "silently skips" aside in the route-model-binding guide, exactly as reported in #3118. I verified every behavioral claim against the framework source and its spec, and the change is accurate: explicit binding="Name" rethrows on resolution failure, while convention-derived binding=true skips silently. The diff itself is clean; verdict is comment — no blocking findings, one minor out-of-diff consistency nit worth picking up (here or as a follow-up).

Correctness

Verified — no findings. The relocated tip and the new caution both match the implementation:

  • vendor/wheels/Dispatch.cfc:701-703 rethrows when local.explicitBinding is true ("An explicit binding name (binding="BlogPost") that fails to resolve is a configuration error — surface it instead of silently skipping."), pinned by vendor/wheels/tests/specs/dispatch/routeModelBindingSpec.cfc:109 ("throws when the explicitly named model cannot be resolved").
  • The convention-derived silent skip (with negative cache) lives at Dispatch.cfc:704-718, pinned by routeModelBindingSpec.cfc:156 ("skips silently when model class does not exist").
  • The tip's new home under "Per-resource opt-in" (route-model-binding.mdx:68-70) is the section where binding=true is introduced, so the scoping is correct as placed. The caution's parenthetical contrast back to binding=true is also accurate.

Docs

One minor consistency nit, outside the diff:

  • CLAUDE.md:347 still carries the same unscoped claim this PR fixes in the guide: "Throws Wheels.RecordNotFound (404) if missing; silently skips if the model class doesn't exist." That line sits directly under examples that include binding="BlogPost", so it repeats the exact mis-scoping #3118 reported. Issue #3118 only names the guide page, so this isn't blocking — but a one-line amendment (e.g. "…silently skips if the convention-derived model class doesn't exist (binding=true); an explicit binding=\"Name\" throws") would close the inconsistency. Fine as a follow-up if the maintainers prefer to keep this PR scoped to the guide.

Everything else checks out: the changelog fragment changelog.d/3118-route-model-binding-aside-scope.fixed.md uses a valid type (fixed) and contains a complete bullet line; no direct CHANGELOG.md edit.

Commits

No findings. Single commit 72e9f34docs(web/guides): scope route-model-binding silent-skip aside to binding=true only is a valid conventional-commit header (84 chars, type docs), and the DCO sign-off matches the commit author identity (claude[bot] <41898282+claude[bot]@users.noreply.github.com>).

Tests

Not applicable — docs-only change; the behavior it documents is already pinned by routeModelBindingSpec.cfc (lines 109 and 156), which is precisely the evidence the new wording cites.

@bpamiri

bpamiri commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Superseded by #3130 (merged 7fae2a3, docs wave group 5) — its rmb-04 finding fixed the identical aside; issue #3118 closed with it. This draft's content was verified correct but develop already carries the fix.

@bpamiri bpamiri closed this Jun 12, 2026
@bpamiri
bpamiri deleted the docs/bot-3118-docs-web-guides-route-model-binding-silently-skips branch June 12, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(web/guides): route-model-binding 'silently skips' aside is mis-scoped — explicit binding names throw on unresolvable models

1 participant