Repository navigation
Conversation
… the Elixir compiler, closes phoenixframework#6753
phoenixframework#6759) * Update Cross-context Boundaries tutorial to include the directory path before a code block. * Update guides/data_modelling/cross_context_boundaries.md --------- Co-authored-by: Steffen Deusch <steffen@deusch.me>
Bumps [ws](https://github.com/websockets/ws) from 8.19.0 to 8.21.1. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](websockets/ws@8.19.0...8.21.1) --- updated-dependencies: - dependency-name: ws dependency-version: 8.21.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
) A module plug given with options as a {plug, opts} tuple raised at compile time: pipe_through [:api, {MyPlug, greeting: "hey"}] ** (ArgumentError) errors were found at the given arguments: * 1st argument: not an atom build_pipes/2 mapped every entry to {plug, [], true}, so a bare atom (function plug, pipeline, or module) worked, but a {plug, opts} tuple was passed through as the plug itself, which Plug.Builder then tried to treat as an atom. Map {plug, opts} tuples to {plug, opts, true} and keep the existing behaviour for bare entries. Closes phoenixframework#6711
* Create GitHub releases with changelog
- Add script to extract a specific changelog entry from CHANGELOG.md
- Add GitHub workflow to automatically create releases on tag push
- Write the extracted changelog entry into the release notes
The extraction is adapted to Phoenix's changelog header format
("## 1.8.9 (2026-07-07)", without a "v" prefix), unlike the
phoenix_live_view equivalent which uses "## v1.2.7 ...".
See phoenixframework/phoenix_live_view#4135
* Align changelog format
Bumps [postcss](https://github.com/postcss/postcss) from 8.5.13 to 8.5.23. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](postcss/postcss@8.5.13...8.5.23) --- updated-dependencies: - dependency-name: postcss dependency-version: 8.5.23 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…hoenixframework#6769) * close and retry the longpoll transport when a batch POST times out `batchSend` reset `awaitingBatchAck` in its response callback and on a non-200 response, but the caller timeout path only called `onerror`. The transport was left waiting for an ack that could never arrive, so every subsequent `send` appended to `batchBuffer` and nothing was ever sent again, while the poll side kept the transport looking alive. Reset the ack and reuse `ontimeout`, so a timed out batch closes and retries the transport the same way a failed one does. Closes phoenixframework#6767
…ixframework#6774) check_origin_config/3 cached the parsed origin policy under {:check_origin, handler}, but the value is computed from the per-mount :check_origin option, which was not part of the key. The cache callback runs once per handler module, so when the same socket module is mounted more than once with different :check_origin options, the first mount to be reached decided the policy for all of them. Given: socket "/a_socket", MyApp.UserSocket, websocket: [check_origin: ["//a.example"]] socket "/b_socket", MyApp.UserSocket, websocket: [check_origin: ["//b.example"]] after a request reaches /a_socket first, /b_socket accepted an origin outside its own allowlist and rejected the one inside it. Reaching /b_socket first swapped the symptoms, making the behaviour depend on request ordering after boot. Mounts that do not set :check_origin still share a single entry and resolve through endpoint.config(:check_origin), so single-mount behaviour is unchanged. The existing check_origin/4 tests passed a fresh make_ref/0 as the handler on every call, so each call got a unique cache key and the caching path was never exercised. The added test uses one fixed handler module across calls. Fixes phoenixframework#6773 Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
…ework#6762) This changes the longpoll client to send its token in a header instead of query parameters. The server still accepts old clients. Closes phoenixframework#6761.
… apps (phoenixframework#6783) Fixes a long-standing flaky test issue in generated SQLite applications where running `mix test` would intermittently fail with: ** (Exqlite.Error) Database busy Root Cause `phx.new` generated `error_html_test.exs` and `error_json_test.exs` with hardcoded `use ConnCase, async: true`. In apps with Ecto enabled, `ConnCase` includes a setup block that calls `DataCase.setup_sandbox(tags)`. When ExUnit runs an `async: true` test module concurrently with `async: false` test modules (such as tests generated by `phx.gen.auth`), `setup_sandbox` sees `tags[:async] == true` and checks out a non-shared secondary connection handle (`shared: false`) from the Repo pool. Because SQLite uses single-file database locking, having two active database connections opening sandbox transactions concurrently causes file lock contention whenever a synchronous test inserts records (e.g. `user_fixture()`). Depending on ExUnit test seeding and process scheduling, the secondary connection checkout fails with `(Exqlite.Error) Database busy`. Background When `--database sqlite3` support was added in 5143696 (phoenixframework#4268, April 2021), error controller test templates retained hardcoded `use ConnCase, async: true`. Later, when `phx.gen.auth` introduced support for `async: true` in 3d609e0 (phoenixframework#5689, January 2024), it added a helper to conditionally append `async: true` ONLY for PostgreSQL adapters while leaving non-Postgres adapters as `async: false`. However, `phx.new` was not updated at the time to use the same logic for its generated error test templates. Fix 1. Add `test_case_options/1` in `Phx.New.Generator` matching the behavior of `phx.gen.auth`: - `Ecto.Adapters.Postgres` -> `", async: true"` - `nil` (no Ecto) -> `", async: true"` - non-Postgres adapters (SQLite, MySQL, TDS) -> `""` 2. Update `error_html_test.exs.eex` and `error_json_test.exs.eex` templates to use `<%= @test_case_options %>`. 3. Added test coverage across single app and umbrella project generators for Postgres, `--no-ecto`, SQLite3, MySQL, and MSSQL.
Bumps the minor-and-patch group with 2 updates: [eslint](https://github.com/eslint/eslint) and [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest). Updates `eslint` from 10.6.0 to 10.8.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](eslint/eslint@v10.6.0...v10.8.0) Updates `eslint-plugin-jest` from 29.15.4 to 29.16.0 - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md) - [Commits](jest-community/eslint-plugin-jest@v29.15.4...v29.16.0) --- updated-dependencies: - dependency-name: eslint dependency-version: 10.8.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: eslint-plugin-jest dependency-version: 29.16.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 7.0.0 to 7.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@9c091bb...3d3c42e) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [jsdom](https://github.com/jsdom/jsdom) from 29.1.1 to 30.0.1. - [Release notes](https://github.com/jsdom/jsdom/releases) - [Commits](jsdom/jsdom@v29.1.1...v30.0.1) --- updated-dependencies: - dependency-name: jsdom dependency-version: 30.0.1 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6.4.0 to 7.0.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@48b55a0...8207627) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
) * Ensure single trailing newline in generated files And no unintentional consecutive blank lines in the generated content. Those two issues are rather aesthetic, but downstream users notice and they are a common source of code churn and maintenance overheard that we can prevent from now on. The single trailing newline is a common convention in Unix and POSIX systems, and it is also what the Elixir formatter does (`Code.format_file!` always appends a trailing newline [1]). The consecutive blank lines in Elixir code are also automatically removed by the Elixir formatter. It is not a strict rule for other files, but generally they are not expected and most of the time added unintentionally, e.g. when using conditional EEx templates or concatenating strings (AGENTS.md / usage rules). Except for a handful of generated files (favicon.ico, phoenix.png and *.pem certificates), all generated files are candidates for those two rules. Instead of updating lots of tests (which would cause a lot of churn and be a future maintenance burden, easy to miss in new tests), we update `MixHelper.assert_file/1` to check for those two rules in all current and future generated files. If we need more exceptions in the future, it is easy to change `assert_file/1` to add them. [1]: https://github.com/elixir-lang/elixir/blob/545dddf138e4cb1ee874e6f2c26882c9b438f551/lib/elixir/lib/code.ex#L1137-L1141 * Format generated schema body with a helper Instead of fighting with whitespace in the template, follow the precedent of `format_fields_for_schema/1` and create a helper that formats the entire schema body, including fields, associations, scope, and timestamps. All permutations of the presence of fields, associations, and scope are tested to ensure correct formatting. * Remove sectional comment before channel definition We don't do this in other files, and the double hash comment is also non-standard.
Declared dependencies in `mix.exs` remain the same, as to not force downstream users to upgrade despite the advisories. Versions used in development and CI (`mix.lock`) updated to the latest versions. Since all versions of Bandit prior to 1.12.1 have a security advisory, `mix.exs` was updated to reflect that, with no effect on downstream users.
Prune redundant Phoenix, Ecto, Elixir, HTML, LiveView, and testing guidance. Consolidate the remaining form, stream, hook, and test rules, correct stream prepend positioning, and include Ecto.Query in generated seed files. Update the generated rules according to the following principles: 1. Remove information that is now commonplace, such as Tailwind v4 setup. 2. Remove information covering mistakes that already produce compilation errors. 3. Remove negative “do not” guidance in accordance with current model prompting guidelines. 4. Evaluate each rule through an isolated Codex section coordinating Codex and Claude CLI runs Co-authored-by: Steffen Deusch <steffen@deusch.me> Co-authored-by: Rodolfo Carvalho <rhcarvalho@gmail.com>
Following up on unifying `.gitignore` templates into a static file, an audit of all installer bindings was conducted to see if any variables eliminated from `.gitignore.eex` became unused repo-wide. While all variables from `.gitignore.eex` remain required by other templates, the audit uncovered two pre-existing unused bindings (`pubsub_server` and `root_app_name`), allowing us to clean them up along with their supporting code: - `pubsub_server`: Stopped being used in templates in commit 04398b6 (June 2019) when PubSub was moved into the application supervision tree and templates switched to referencing `<%= web_namespace %>.PubSub` directly. Remove `pubsub_server` from binding and delete the helper `get_pubsub_server/1`. - `root_app_name` / `root_app`: `root_app_name` was defined when umbrella generators were added in commit dad413f (Jan 2017), but templates have always used `@root_app_module` (`MyApp.Umbrella`) instead. Remove `root_app_name` from binding and drop the `root_app` struct field from `%Phx.New.Project{}`. - Helper cleanup: `Project.new/2` already initializes `root_mod` to `app_mod` (`Module.concat([opts[:module] || Macro.camelize(app)])`). In `Phx.New.Single`, `put_root_app/1` was computing the exact same value a second time to assign `root_mod`, making it a no-op. Remove `put_root_app/1` from `Single`, and rename `put_root_app/1` to `put_root_mod/1` in `Phx.New.Umbrella` where it actually overrides `root_mod` with the `MyApp.Umbrella` module name.
* Store verified route warning files relative to the project ~p warnings are emitted from @after_verify using the file stored at compile time. With an absolute path, a copy of the project reusing the build (git worktree, copy-on-write clone, compiled with check_cwd: false) reported warnings in the original checkout's files. * Expand the ~p warning file when the warning is emitted Mix persists compiler warnings by their absolute source path. Elixir makes the file of a warning emitted from @after_verify absolute again when collecting it, but not its source. A warning with a relative file was therefore printed once and never stored in the manifest: later compilations did not print it again with --all-warnings, and a no-op compilation passed --warnings-as-errors. Keep storing the file relative to the project, so that copies of the project reusing the build report their own files, and expand it against the current directory when the warning is emitted. --------- Co-authored-by: Steffen Deusch <steffen@deusch.me>
Closes phoenixframework#6897. Co-Authored-By: Rami Hersonsky <323262677+ramiscaleai@users.noreply.github.com>
edgurgel
force-pushed
the
sync/phoenix-main
branch
from
November 23, 2026 02:46
13884ea to
ddc4483
Compare
Conflict resolutions:
- socket.js: take the upstream Connection rework and keep the fork
heartbeat callback, beforeReconnect, JSDoc types and
triggerStateCallbacks. Channel errors use the upstream payload
{source: "transport", reason} plus `event` with the raw close/error
event when one exists.
- Remove the `this.conn` field, because upstream made `conn` a getter.
- Document reconnectWhenHidden in types.js.
- Keep the fork assets.yml PR flow and CHANGELOG. Keep the lint step in CI.
- Rebuild priv/static and the type declarations.
ubuntu-latest now resolves to ubuntu26, which setup-beam v1.23.0 cannot map.
edgurgel
force-pushed
the
sync/phoenix-main
branch
from
November 23, 2026 02:47
ddc4483 to
70bbdf7
Compare
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.
What kind of change does this PR introduce?
Sync with latest phoenix (
upstream/mainat 37d3421). This includes the fixes that shipped in v1.8.14 to v1.8.17.Conflict resolutions
assets/js/phoenix/socket.js: upstream reworked the connection handling (newConnectionmodule). The upstream logic is the base. The fork keeps the heartbeat callback,beforeReconnect, the JSDoc types andtriggerStateCallbacks.phx_errorpayload: upstream now sends{source: "transport", reason}. The fork change from fix: forward close/error reason to channels in triggerChanError #29 sent the raw close or error event. The payload is now{source: "transport", reason, event}. If no close or error event exists, the payload has noeventkey. realtime-js must readpayload.eventinstead of the payload itself.this.connfield is removed, because upstream madeconna getter. An assignment to the getter throws an error.reconnectWhenHiddenis documented intypes.js.assets.ymlkeeps the fork flow (PR with automerge) and takes the upstream Elixir/OTP and checkout versions.ci.ymlkeeps the lint step.CHANGELOG.mdkeeps the release-please content.priv/staticand the type declarations are rebuilt from source.realtime.yml,release.ymlandpreview-release.ymlnow run onubuntu-24.04withsetup-beamv1.24.1.ubuntu-latestnow resolves to Ubuntu 26, whichsetup-beamv1.23.0 cannot map, so the Realtime jobs failed at setup.