Skip to content

Remove Railo-era compatibility code from Plugins.cfc #1975

Closed

Description

@bpamiri

Summary

Plugins.cfc:303-306 contains a Railo-specific Duplicate() workaround for a bug that was fixed in Railo 3.2. All Lucee versions (which replaced Railo) are unaffected. This is dead code that adds complexity for no benefit.

Current Code

// Plugins.cfc ~line 303-306
// Railo workaround — Duplicate() throws on certain component metadata

Changes

  • Remove the Railo-specific conditional branch
  • Simplify the surrounding logic now that only Lucee/Adobe CF are supported
  • Verify existing plugin tests pass

Files

  • vendor/wheels/Plugins.cfc:303-306

Phase

Phase 1 — Cleanup & Foundation (3.x, no breaking changes)

Activity

  1. bpamiri commented on Mar 16, 2026

    @bpamiri
    CollaboratorAuthor

    Analysis

    Synopsis

    Remove a Railo-specific Duplicate() workaround in $initializeMixins() (lines 303-306) that guards against a bug fixed in Railo 3.2. Since Lucee replaced Railo and all supported engines are Lucee, Adobe CF, or BoxLang, this is dead code.

    Merit Assessment

    Recommendation: Proceed

    • The Railo branch at line 303 (application[$wheels.appKey].serverName == "Railo") can never be true — Railo is not a supported engine and the server detection in onapplicationstart.cfc:36-45 only sets BoxLang, Lucee, or Adobe ColdFusion.
    • Removing it simplifies $initializeMixins() and eliminates a confusing conditional that misleads contributors into thinking Railo compatibility matters.
    • Zero risk of behavioral change since the branch is unreachable.

    Implementation Plan

    1. Edit vendor/wheels/Plugins.cfc:302-312 — Remove the Railo conditional branch. The current code:
      if (!StructKeyExists(variablesScope, "core")) {
          if (application[$wheels.appKey].serverName == "Railo") {
              variablesScope.core = Duplicate(variablesScope);
          } else {
              variablesScope.core = {};
              StructAppend(variablesScope.core, variablesScope);
              StructDelete(variablesScope.core, "$wheels");
          }
      }
      
      Becomes:
      if (!StructKeyExists(variablesScope, "core")) {
          variablesScope.core = {};
          StructAppend(variablesScope.core, variablesScope);
          StructDelete(variablesScope.core, "$wheels");
      }
      
    2. Run existing plugin tests — vendor/wheels/tests/specs/pluginsSpec.cfc covers mixin injection across controller, model, dispatch, and test targets. Existing tests are sufficient.
    3. Estimated complexity: Trivial — 3 lines removed, no new logic.

    Dependencies & Risks

    • No dependencies on other issues.
    • No breaking change risk — the removed branch was unreachable on all supported engines.
    • Could also audit for other Railo references across the codebase (search for "Railo") as a follow-up cleanup.

    Automated analysis by @claude — review and adjust as needed.

  2. added a commit that references this issue on Mar 16, 2026
    ddbcfe3
  3. added this to the v3.1 milestone on Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions