Skip to content

Commit 584fc44

Browse files
authored
fix(cli): legacy wheels g app defaults to 4.0 template + deprecation banner (#2227) (#2236)
Legacy CommandBox `wheels g app` defaulted to `wheels-base-template@^3.1.0`, so at 4.0 GA `box install wheels-cli && wheels g app foo` produced a 3.x scaffold. Docstring also falsely claimed "Default is Bleeding Edge". Changes in cli/src/commands/wheels/generate/app.cfc: - Default template `@^3.1.0` -> `@^4.0.0` (line 71) - `WheelsBaseTemplate` shortcut mapping `@^3.1.0` -> `@^4.0.0` (line 46) - Docstring fix: reflect actual (stable 4.0) default - Block-comment entry updated to "4.0 Stable (default)" - Deprecation banner printed at start of run(), pointing users at LuCLI `wheels new`, noting v5.0 removal Also fixes the same bug in app-wizard.cfc (line 159): the pre-selected menu entry was pinned to `@^3.1.0`. Because the wizard delegates to `wheels g app`, leaving this untouched would bypass the fix above when users accept the default selection. CHANGELOG entries added under [Unreleased] `### Deprecated` (removal in v5.0) and `### Fixed` (the 4.0 default). Closes #2227
1 parent 453f16f commit 584fc44

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ All historical references to "CFWheels" in this changelog have been preserved fo
131131
- RocketUnit test style for new tests — BDD syntax (via WheelsTest) is required going forward. Existing RocketUnit specs continue to run. (#1925)
132132
- `wheels.Test` test base class — extend `wheels.WheelsTest` instead (#1889)
133133
- In-dev-server HTTP MCP endpoint at `/wheels/mcp` — superseded by the LuCLI stdio MCP server (`wheels mcp wheels`). Emits a deprecation warning to the `wheels_mcp` log on first request and advertises `deprecated: true` in the `serverInfo` handshake. Scheduled for removal in a future release. Migrate existing projects with `wheels mcp setup --force`.
134+
- Legacy CommandBox `wheels-cli` module (`wheels g app`, `wheels new` via the CommandBox wizard) — superseded by LuCLI's canonical `wheels new`. Emits a deprecation banner on every invocation. Scheduled for removal in v5.0. (#2227)
134135

135136
### Removed
136137

@@ -142,6 +143,7 @@ All historical references to "CFWheels" in this changelog have been preserved fo
142143

143144
### Fixed
144145

146+
- Legacy CommandBox `wheels g app` now scaffolds a 4.0 app by default — the `wheels-base-template` default was pinned at `@^3.1.0`, so `box install wheels-cli && wheels g app myapp` produced a 3.x scaffold at 4.0 GA. Updated default (and the `WheelsBaseTemplate` shortcut + wizard default selection) to `@^4.0.0`, fixed the stale "Default is Bleeding Edge" docstring, and added a deprecation banner pointing users at LuCLI's `wheels new`. (#2227)
145147
- `changeColumn` on SQLite now works by implementing the SQLite-standard recreate-table pattern in `SQLiteMigrator`. Previously, SQLite migrations inherited MySQL's `ALTER TABLE ... CHANGE` syntax from `Abstract.cfc` and failed with `near "CHANGE": syntax error`. The migrator's `$execute` now accepts an array of statements so adapters can return multi-step DDL. v1 limitations: foreign-key constraints declared inline on `CREATE TABLE` and triggers are not preserved across the recreate. (#2207)
146148
- Framework-internal browser-test fixture controllers, views, and the `/_browser/*` routes no longer leak into application-level files. Moved from `app/controllers/BrowserTest*.cfc`, `app/views/browsertest*/`, and `config/routes.cfm` into `vendor/wheels/public/browser-fixtures/`, auto-mounted by `$lockedLoadRoutes` when environment is `testing` or `development` and the new opt-in setting `loadBrowserTestFixtures=true` is set. Apps upgrading from a 4.0 snapshot that had custom `/_browser/*` routes must opt in explicitly or re-declare them in `config/routes.cfm`. (#2135, #2138)
147149
- Stray `app/mailers/UserNotificationsMailer.cfc` demo removed from the framework repo root (byte-identical copies remain in the example apps under `examples/tweet/` and `examples/starter-app/`). (#2138)

cli/src/commands/wheels/generate/app-wizard.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ component aliases="wheels g app-wizard, wheels new" extends="../base" {
156156

157157
var template = multiselect( 'Which Wheels Template shall we use? ' )
158158
.options( [
159-
{value: 'wheels-base-template@^3.1.0', display: '3.1 - Wheels Base Template - Stable', selected: true},
159+
{value: 'wheels-base-template@^4.0.0', display: '4.0 - Wheels Base Template - Stable', selected: true},
160160
{value: 'wheels-base-template@BE', display: 'Bleeding Edge - Wheels Base Template'},
161161
{value: 'wheels-template-htmx-alpine-simple', display: 'Wheels Template - HTMX - Alpine.js - Simple.css'},
162162
{value: 'wheels-starter-app', display: 'Wheels Starter App'},

cli/src/commands/wheels/generate/app.cfc

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* {code}
1515
*
1616
* Here are the basic templates that are available for you that come from ForgeBox
17-
* - Wheels Base Template - 3.0 Stable (default)
17+
* - Wheels Base Template - 4.0 Stable (default)
1818
* - Wheels Base Template - Bleeding Edge
1919
* - Wheels Template - HelloWorld
2020
* - Wheels Template - HelloDynamic
@@ -43,7 +43,7 @@ component aliases="wheels g app" extends="../base" {
4343

4444
// Map these shortcut names to the actual ForgeBox slugs
4545
variables.templateMap = {
46-
'WheelsBaseTemplate' : 'wheels-base-template@^3.1.0',
46+
'WheelsBaseTemplate' : 'wheels-base-template@^4.0.0',
4747
'BleedingEdge' : 'wheels-base-template@BE',
4848
'WheelsTemplateHTMX' : 'wheels-template-htmx-alpine-simple',
4949
'WheelsStarterApp' : 'wheels-starter-app',
@@ -55,7 +55,7 @@ component aliases="wheels g app" extends="../base" {
5555

5656
/**
5757
* @name The name of the app you want to create
58-
* @template The name of the app template to generate (or an endpoint ID like a forgebox slug). Default is Bleeding Edge
58+
* @template The name of the app template to generate (or an endpoint ID like a forgebox slug). Default is the stable Wheels Base Template (4.0).
5959
* @directory The directory to create the app in
6060
* @reloadPassword The reload passwrod to set for the app
6161
* @datasourceName The datasource name to set for the app
@@ -68,7 +68,7 @@ component aliases="wheels g app" extends="../base" {
6868
**/
6969
function run(
7070
name = 'MyApp',
71-
template = 'wheels-base-template@^3.1.0',
71+
template = 'wheels-base-template@^4.0.0',
7272
directory,
7373
reloadPassword = '',
7474
datasourceName,
@@ -86,6 +86,14 @@ component aliases="wheels g app" extends="../base" {
8686
// Initialize detail service
8787
var details = application.wirebox.getInstance("DetailOutputService@wheels-cli");
8888

89+
// Deprecation notice — legacy CommandBox surface is scheduled for removal in Wheels v5.0.
90+
// Canonical 4.0+ CLI is LuCLI's `wheels new` (https://github.com/bpamiri/LuCLI).
91+
details.getPrint().yellowBoldLine( "[DEPRECATED] 'wheels g app' (CommandBox wheels-cli) is deprecated." );
92+
details.getPrint().yellowLine( " Use LuCLI 'wheels new' instead — the canonical Wheels 4.0+ CLI." );
93+
details.getPrint().yellowLine( " Install: brew install lucli (or see https://github.com/bpamiri/LuCLI)" );
94+
details.getPrint().yellowLine( " This command will be removed in Wheels v5.0." );
95+
details.line();
96+
8997
// set defaults based on app name
9098
if ( !len( arguments.directory ) ) {
9199
arguments.directory = '#getCWD()##arguments.name#';

0 commit comments

Comments
 (0)