Skip to content

fix: v4.1 regressions found in PMX/CounterPro upgrade (#3515–#3519) - #3520

Merged
bpamiri merged 6 commits into
developfrom
peter/fix-v41-regressions
Sep 8, 2026
Merged

bpamiri merged 6 commits into
developfrom
peter/fix-v41-regressions

Conversation

@bpamiri

@bpamiri bpamiri commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

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 instances

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.
Fix: register the aliases at the top of $initModelObject() (idempotent, so the legacy init() path is unaffected).

#3516 — Injector.map() drops lifecycle on path re-map

map("name").to("other.Path") deleted singletonFlags/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() throws RouteNotFound for PUT/PATCH/DELETE member routes

startFormTag() rewrote put/patch/delete → post (for the HTML method) then resolved the named route with post — 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 variables

Bare 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 for delete

The model-side variables.super<name> alias is gone in 4.1.0; the sanctioned path is the parent-method call super.delete().
Fix: add a delete() override fixture + spec pinning the sanctioned path, and a manual-upgrade note.

Verification

  • Full core suite (Lucee 7 + SQLite): 5,567 pass / 0 fail / 0 error (22 skipped are pre-existing SQLite/DB-conditional skips).
  • Targeted: controller 532, di 52, view 582, injector 30 — all green.

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>
@bpamiri bpamiri changed the title fix: v4.1 regressions found in PMX/CounterPro upgrade (#3515, #3516, #3517) fix: v4.1 regressions found in PMX/CounterPro upgrade (#3515–#3519) Sep 7, 2026
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>
@bpamiri
bpamiri merged commit 2274265 into develop Sep 8, 2026
22 checks passed
@bpamiri
bpamiri deleted the peter/fix-v41-regressions branch September 8, 2026 05:31
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.

1 participant