Skip to content

Fix phx.new.web generator referencing Ecto - #6808

Merged
SteffenDE merged 1 commit into
phoenixframework:mainfrom
praialabs:fix-phx-new-web-defaults
Sep 1, 2026
Merged

Fix phx.new.web generator referencing Ecto#6808
SteffenDE merged 1 commit into
phoenixframework:mainfrom
praialabs:fix-phx-new-web-defaults

Conversation

@rhcarvalho

Copy link
Copy Markdown
Contributor

The phx.new.web task is documented to create a bare Phoenix web project without database integration inside an umbrella. However, because it did not pass --no-ecto, it inherited the generator's default ecto: true setting, generating invalid references to a non-existent <App>.Repo and <App>.DataCase.

This passes --no-ecto by default when running phx.new.web.

Fixes #5690.
Closes #5691.

@rhcarvalho

Copy link
Copy Markdown
Contributor Author

Assisted by Google Antigravity CLI / Gemini 3.7 Flash.

@SteffenDE

Copy link
Copy Markdown
Member

@rhcarvalho can you rebase please?

The `phx.new.web` task is documented to create a bare Phoenix web
project without database integration inside an umbrella. However,
because it did not pass `--no-ecto`, it inherited the generator's
default `ecto: true` setting, generating invalid references to a
non-existent `<App>.Repo` and `<App>.DataCase`.

This passes `--no-ecto` by default when running `phx.new.web`.

We also take the opportunity to tighten test assertions and `mix format`
the touched files.
@rhcarvalho
rhcarvalho force-pushed the fix-phx-new-web-defaults branch from e36bb2c to ffab8ca Compare September 1, 2026 12:58
@rhcarvalho

Copy link
Copy Markdown
Contributor Author

Rebased

@SteffenDE
SteffenDE merged commit b4056c3 into phoenixframework:main Sep 1, 2026
9 checks passed
@SteffenDE

Copy link
Copy Markdown
Member

Good, we might revisit adding a --context-app or similar in the future!

@rhcarvalho
rhcarvalho deleted the fix-phx-new-web-defaults branch September 1, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Creating Umbrella Web App With phx.new.web Results in App That Cannot Be Compiled

2 participants