Skip to content

Commit f068728

Browse files
committed
Release 1.8.2
1 parent bd3cf83 commit f068728

File tree

9 files changed

+92
-58
lines changed

9 files changed

+92
-58
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This release introduces deprecation warnings for several features that have been
2929

3030
* The `config` variable is no longer available in `Phoenix.Endpoint`. In the past, it was possible to read your endpoint configuration at compile-time via an injected variable named `config`, which is no longer supported. Use `Application.compile_env/3` instead, which is tracked by the Elixir compiler and lead to a better developer experience. This may also lead to errors on application boot if you were previously incorrectly setting compile time config at runtime.
3131

32-
## 1.8.2 (Unreleased)
32+
## 1.8.2 (2025-11-26)
3333

3434
### Bug fixes
3535
- [phoenix.js] fix issue where LongPoll can cause "unmatched topic" errors (observed on iOS only) ([#6538](https://github.com/phoenixframework/phoenix/pull/6538))
@@ -46,6 +46,7 @@ This release introduces deprecation warnings for several features that have been
4646
- [Phoenix.Controller.assign/2] allow passing a function as second argument ([#6542](https://github.com/phoenixframework/phoenix/pull/6542))
4747
- [Phoenix.Controller.assign/2] support keyword lists and maps as second argument similar to LiveView ([#6513](https://github.com/phoenixframework/phoenix/pull/6513))
4848
- [Presence] support custom dispatcher for `presence_diff` broadcast ([#6500](https://github.com/phoenixframework/phoenix/pull/6500))
49+
- [AGENTS.md] add short test guidelines to usage rules
4950

5051
## 1.8.1 (2025-08-28)
5152

installer/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ end
66
defmodule Phx.New.MixProject do
77
use Mix.Project
88

9-
@version "1.8.1"
9+
@version "1.8.2"
1010
@scm_url "https://github.com/phoenixframework/phoenix"
1111

1212
# If the elixir requirement is updated, we need to update:

installer/mix.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
%{
22
"earmark_parser": {:hex, :earmark_parser, "1.4.44", "f20830dd6b5c77afe2b063777ddbbff09f9759396500cdbe7523efd58d7a339c", [:mix], [], "hexpm", "4778ac752b4701a5599215f7030989c989ffdc4f6df457c5f36938cc2d2a2750"},
3-
"ex_doc": {:hex, :ex_doc, "0.38.4", "ab48dff7a8af84226bf23baddcdda329f467255d924380a0cf0cee97bb9a9ede", [:mix], [{:earmark_parser, "~> 1.4.44", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "f7b62346408a83911c2580154e35613eb314e0278aeea72ed7fedef9c1f165b2"},
3+
"ex_doc": {:hex, :ex_doc, "0.39.1", "e19d356a1ba1e8f8cfc79ce1c3f83884b6abfcb79329d435d4bbb3e97ccc286e", [:mix], [{:earmark_parser, "~> 1.4.44", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "8abf0ed3e3ca87c0847dfc4168ceab5bedfe881692f1b7c45f4a11b232806865"},
44
"makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"},
55
"makeup_elixir": {:hex, :makeup_elixir, "1.0.1", "e928a4f984e795e41e3abd27bfc09f51db16ab8ba1aebdba2b3a575437efafc2", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "7284900d412a3e5cfd97fdaed4f5ed389b8f2b4cb49efc0eb3bd10e2febf9507"},
66
"makeup_erlang": {:hex, :makeup_erlang, "1.0.2", "03e1804074b3aa64d5fad7aa64601ed0fb395337b982d9bcf04029d68d51b6a7", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "af33ff7ef368d5893e4a267933e7744e46ce3cf1f61e2dccf53a111ed3aa3727"},

priv/static/phoenix.cjs.js

Lines changed: 28 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

priv/static/phoenix.cjs.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

priv/static/phoenix.js

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,14 @@ var Phoenix = (() => {
253253
});
254254
this.onClose(() => {
255255
this.rejoinTimer.reset();
256-
if (this.socket.hasLogger()) this.socket.log("channel", `close ${this.topic} ${this.joinRef()}`);
256+
if (this.socket.hasLogger())
257+
this.socket.log("channel", `close ${this.topic} ${this.joinRef()}`);
257258
this.state = CHANNEL_STATES.closed;
258259
this.socket.remove(this);
259260
});
260261
this.onError((reason) => {
261-
if (this.socket.hasLogger()) this.socket.log("channel", `error ${this.topic}`, reason);
262+
if (this.socket.hasLogger())
263+
this.socket.log("channel", `error ${this.topic}`, reason);
262264
if (this.isJoining()) {
263265
this.joinPush.reset();
264266
}
@@ -268,7 +270,8 @@ var Phoenix = (() => {
268270
}
269271
});
270272
this.joinPush.receive("timeout", () => {
271-
if (this.socket.hasLogger()) this.socket.log("channel", `timeout ${this.topic} (${this.joinRef()})`, this.joinPush.timeout);
273+
if (this.socket.hasLogger())
274+
this.socket.log("channel", `timeout ${this.topic} (${this.joinRef()})`, this.joinPush.timeout);
272275
let leavePush = new Push(this, CHANNEL_EVENTS.leave, closure({}), this.timeout);
273276
leavePush.send();
274277
this.state = CHANNEL_STATES.errored;
@@ -414,7 +417,8 @@ var Phoenix = (() => {
414417
this.joinPush.cancelTimeout();
415418
this.state = CHANNEL_STATES.leaving;
416419
let onClose = () => {
417-
if (this.socket.hasLogger()) this.socket.log("channel", `leave ${this.topic}`);
420+
if (this.socket.hasLogger())
421+
this.socket.log("channel", `leave ${this.topic}`);
418422
this.trigger(CHANNEL_EVENTS.close, "leave");
419423
};
420424
let leavePush = new Push(this, CHANNEL_EVENTS.leave, closure({}), timeout);
@@ -448,7 +452,8 @@ var Phoenix = (() => {
448452
return false;
449453
}
450454
if (joinRef && joinRef !== this.joinRef()) {
451-
if (this.socket.hasLogger()) this.socket.log("channel", "dropping outdated message", { topic, event, payload, joinRef });
455+
if (this.socket.hasLogger())
456+
this.socket.log("channel", "dropping outdated message", { topic, event, payload, joinRef });
452457
return false;
453458
} else {
454459
return true;
@@ -791,7 +796,7 @@ var Phoenix = (() => {
791796
};
792797

793798
// js/phoenix/presence.js
794-
var Presence = class _Presence {
799+
var Presence = class {
795800
constructor(channel, opts = {}) {
796801
let events = opts.events || { state: "presence_state", diff: "presence_diff" };
797802
this.state = {};
@@ -809,9 +814,9 @@ var Phoenix = (() => {
809814
this.channel.on(events.state, (newState) => {
810815
let { onJoin, onLeave, onSync } = this.caller;
811816
this.joinRef = this.channel.joinRef();
812-
this.state = _Presence.syncState(this.state, newState, onJoin, onLeave);
817+
this.state = Presence.syncState(this.state, newState, onJoin, onLeave);
813818
this.pendingDiffs.forEach((diff) => {
814-
this.state = _Presence.syncDiff(this.state, diff, onJoin, onLeave);
819+
this.state = Presence.syncDiff(this.state, diff, onJoin, onLeave);
815820
});
816821
this.pendingDiffs = [];
817822
onSync();
@@ -821,7 +826,7 @@ var Phoenix = (() => {
821826
if (this.inPendingSyncState()) {
822827
this.pendingDiffs.push(diff);
823828
} else {
824-
this.state = _Presence.syncDiff(this.state, diff, onJoin, onLeave);
829+
this.state = Presence.syncDiff(this.state, diff, onJoin, onLeave);
825830
onSync();
826831
}
827832
});
@@ -836,7 +841,7 @@ var Phoenix = (() => {
836841
this.caller.onSync = callback;
837842
}
838843
list(by) {
839-
return _Presence.list(this.state, by);
844+
return Presence.list(this.state, by);
840845
}
841846
inPendingSyncState() {
842847
return !this.joinRef || this.joinRef !== this.channel.joinRef();
@@ -1385,7 +1390,8 @@ var Phoenix = (() => {
13851390
clearTimeout(this.heartbeatTimeoutTimer);
13861391
}
13871392
onConnOpen() {
1388-
if (this.hasLogger()) this.log("transport", `${this.transport.name} connected to ${this.endPointURL()}`);
1393+
if (this.hasLogger())
1394+
this.log("transport", `${this.transport.name} connected to ${this.endPointURL()}`);
13891395
this.closeWasClean = false;
13901396
this.disconnecting = false;
13911397
this.establishedConnections++;
@@ -1470,10 +1476,12 @@ var Phoenix = (() => {
14701476
}, 150 * tries);
14711477
}
14721478
onConnClose(event) {
1473-
if (this.conn) this.conn.onclose = () => {
1474-
};
1479+
if (this.conn)
1480+
this.conn.onclose = () => {
1481+
};
14751482
let closeCode = event && event.code;
1476-
if (this.hasLogger()) this.log("transport", "close", event);
1483+
if (this.hasLogger())
1484+
this.log("transport", "close", event);
14771485
this.triggerChanError();
14781486
this.clearHeartbeats();
14791487
if (!this.closeWasClean && closeCode !== 1e3) {
@@ -1485,7 +1493,8 @@ var Phoenix = (() => {
14851493
* @private
14861494
*/
14871495
onConnError(error) {
1488-
if (this.hasLogger()) this.log("transport", error);
1496+
if (this.hasLogger())
1497+
this.log("transport", error);
14891498
let transportBefore = this.transport;
14901499
let establishedBefore = this.establishedConnections;
14911500
this.stateChangeCallbacks.error.forEach(([, callback]) => {
@@ -1609,7 +1618,8 @@ var Phoenix = (() => {
16091618
this.pendingHeartbeatRef = null;
16101619
this.heartbeatTimer = setTimeout(() => this.sendHeartbeat(), this.heartbeatIntervalMs);
16111620
}
1612-
if (this.hasLogger()) this.log("receive", `${payload.status || ""} ${topic} ${event} ${ref && "(" + ref + ")" || ""}`, payload);
1621+
if (this.hasLogger())
1622+
this.log("receive", `${payload.status || ""} ${topic} ${event} ${ref && "(" + ref + ")" || ""}`, payload);
16131623
for (let i = 0; i < this.channels.length; i++) {
16141624
const channel = this.channels[i];
16151625
if (!channel.isMember(topic, event, payload, join_ref)) {
@@ -1626,7 +1636,8 @@ var Phoenix = (() => {
16261636
leaveOpenTopic(topic) {
16271637
let dupChannel = this.channels.find((c) => c.topic === topic && (c.isJoined() || c.isJoining()));
16281638
if (dupChannel) {
1629-
if (this.hasLogger()) this.log("transport", `leaving duplicate topic "${topic}"`);
1639+
if (this.hasLogger())
1640+
this.log("transport", `leaving duplicate topic "${topic}"`);
16301641
dupChannel.leave();
16311642
}
16321643
}

0 commit comments

Comments
 (0)