docs(web/guides): scope route-model-binding silent-skip aside to binding=true only - #3122
Conversation
…ing=true only Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
There was a problem hiding this comment.
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-703rethrows whenlocal.explicitBindingis true ("An explicit binding name (binding="BlogPost") that fails to resolve is a configuration error — surface it instead of silently skipping."), pinned byvendor/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 byrouteModelBindingSpec.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 wherebinding=trueis introduced, so the scoping is correct as placed. The caution's parenthetical contrast back tobinding=trueis also accurate.
Docs
One minor consistency nit, outside the diff:
CLAUDE.md:347still carries the same unscoped claim this PR fixes in the guide: "ThrowsWheels.RecordNotFound(404) if missing; silently skips if the model class doesn't exist." That line sits directly under examples that includebinding="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 explicitbinding=\"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 72e9f34 — docs(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.
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-derivedbinding=true. For an explicit model name (binding="BlogPost"),Dispatch.cfc::$resolveRouteModelBindingdeliberately rethrows on a resolution failure, as pinned byrouteModelBindingSpec.cfc:109. As placed, the aside taught users that a typo'dbinding="BlogPsot"would silently no-op, when it actually throws on first matching request.Changes:
binding=trueconvention-derived lookups where it is accurate.cautionthat explains explicit binding names throw on unresolvable classes, and cross-references thebinding=truesilent-skip behavior for contrast.changelog.d/fragment for the fix.Fixes #3118