Repository navigation
fix: v4.1 regressions found in PMX/CounterPro upgrade (#3515–#3519) - #3520
Merged
Merged
Conversation
The #3213 instance fast path builds instances with CreateObject + $initModelObject, skipping init() — so the super<name> override aliases (#3325) never registered on new()/create()/finder rows. An app model that overrides a mixin and delegates via super<name> threw MethodNotFound. Register the aliases at the top of $initModelObject() too; the helper is idempotent, so the legacy init() path that already registered them is unaffected. Fixes #3515 Signed-off-by: Peter Amiri <peter@alurium.com>
map("name").to("other.Path") deleted singletonFlags/requestScopedFlags,
silently degrading a re-bound singleton to transient. Re-binding a singleton
to a test double then produced a fresh instance on every resolve.
to() already invalidates the cached instance only on a path change, so the
flag deletion in map() was both redundant and harmful. Preserve the flags and
clear only request.$wheelsDICache. Updates the S2 hardener proofs to match.
Fixes #3516
Signed-off-by: Peter Amiri <peter@alurium.com>
startFormTag() rewrote put/patch/delete to post (for the rendered HTML method) and then resolved the named route with post — a verb resource member routes never declare — so $findRoute() threw Wheels.RouteNotFound. Resolve urlFor()/$routeVariables() with the original verb, then restore the HTML verb before rendering the <form method="..."> attribute. Fixes #3517 Signed-off-by: Peter Amiri <peter@alurium.com>
…riables $includeAndReturnOutput() includes the view template inside its own function scope, so bare locals ($resolved, captured, fallbacks, includeState, …) were visible to the included template and shadowed same-named controller variables a view relied on. $-prefix every local ($resolved, $captured, $includeState, $fallbacks, $fbCount, $fbIndex) so the include can only collide on a $-prefixed name. Fixes #3518 Signed-off-by: Peter Amiri <peter@alurium.com>
…path 4.1.0 moved the model mixins to compile-time includes (#3213), so a model override that delegated via the legacy variables.super<name> alias must call the parent method instead (super.delete()). Pin the sanctioned path with a delete() override fixture + spec, and add the upgrade note to the manual upgrade guide. Fixes #3519 Signed-off-by: Peter Amiri <peter@alurium.com>
The renderer lowercases the action name when resolving the view template, so the fixture must be testresolved.cfm. macOS passed the camelCase name by accident (case-insensitive filesystem); Linux CI (RustCFML, Adobe) did not. Signed-off-by: Peter Amiri <peter@alurium.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes five regressions surfaced by upgrading PMX and CounterPro to Wheels v4.1. Each commit is self-contained (fix + regression test).
#3515 —
super<name>aliases missing on model instancesThe
#3213instance fast path builds instances withCreateObject+$initModelObject, skippinginit()— so thesuper<name>override aliases (#3325) never registered onnew()/create()/finder rows.Fix: register the aliases at the top of
$initModelObject()(idempotent, so the legacyinit()path is unaffected).#3516 —
Injector.map()drops lifecycle on path re-mapmap("name").to("other.Path")deletedsingletonFlags/requestScopedFlags, degrading a re-bound singleton to transient.Fix: preserve the flags on path re-map (clear only
request.$wheelsDICache). Updated the S2 hardener proofs to match.#3517 —
startFormTag()throwsRouteNotFoundfor PUT/PATCH/DELETE member routesstartFormTag()rewrote put/patch/delete → post (for the HTML method) then resolved the named route withpost— a verb resource member routes never declare.Fix: resolve the route with the original verb, restore the HTML verb before rendering.
#3518 —
$includeAndReturnOutput()locals shadow view variablesBare locals (
resolved,captured,fallbacks,includeState, …) were visible to the included view template, shadowing same-named controller variables.Fix:
$-prefix every local.#3519 — model
super<name>delegation breaks fordeleteThe model-side
variables.super<name>alias is gone in 4.1.0; the sanctioned path is the parent-method callsuper.delete().Fix: add a
delete()override fixture + spec pinning the sanctioned path, and a manual-upgrade note.Verification