Repository: phoenixframework/phoenix
Pull request #4470 (2021-09-08 14:54:24)

Update `Phoenix.Socket` docs to clarify defaults
`Phoenix.Endpoint.socket/3` sets `websocket` on by default and `longpoll` is off by default. Previous phrasing implied that both were on by default.

https://hexdocs.pm/phoenix/Phoenix.Endpoint.html#socket/3

`:longpoll` - controls the longpoll configuration. Defaults to false

https://github.com/phoenixframework/phoenix/blob/v1.5.12/lib/phoenix/endpoint.ex#L649-L650


Patch:
diff --git a/guides/deployment/heroku.md b/guides/deployment/heroku.md
index 90bc807e7..63137e308 100644
--- a/guides/deployment/heroku.md
+++ b/guides/deployment/heroku.md
@@ -114,9 +114,9 @@ Finally, let's tell the build pack how to start our webserver. Create a file nam
 web: mix phx.server
 ```
 
-### Optional: Assets Buildpack
+### Optional: Node, npm, and the Phoenix Static buildpack
 
-By default, Phoenix uses `esbuild` and manages all assets for you. However, if you are using `npm`, `webpack`, `postcss`, or similar tools, you will need to install the [Phoenix Static buildpack](https://github.com/gjaldon/heroku-buildpack-phoenix-static) to handle them:
+By default, Phoenix uses `esbuild` and manages all assets for you. However, if you are using `node` and `npm`, you will need to install the [Phoenix Static buildpack](https://github.com/gjaldon/heroku-buildpack-phoenix-static) to handle them:
 
 ```console
 $ heroku buildpacks:add https://github.com/gjaldon/heroku-buildpack-phoenix-static.git
@@ -125,6 +125,18 @@ Buildpack added. Next release on mysterious-meadow-6277 will use:
   2. https://github.com/gjaldon/heroku-buildpack-phoenix-static.git
 ```
 
+When using this buildpack, you want to delegate all asset bundling to `npm`. So you must remove the `hook_post_compile` configuration from your `elixir_buildpack.config` and move it to the deploy script of your `assets/package.json`. Something like this:
+
+```javascript
+{
+  ...
+  "scripts": {
+    "deploy": "cd .. && mix assets.deploy && rm -f _build/esbuild"
+  }
+  ...
+}
+```
+
 The Phoenix Static buildpack uses a predefined Node.js version but to avoid surprises when deploying, it is best to explicitly list the Node.js version we want in production to be the same we are using during development or in your continuous integration servers. This is done by creating a config file named `phoenix_static_buildpack.config` in the root directory of your project with your target version of Node.js:
 
 ```
@@ -134,8 +146,6 @@ node_version=10.20.1
 
 Please refer to the [configuration section](https://github.com/gjaldon/heroku-buildpack-phoenix-static#configuration) for full details. You can make your own custom build script, but for now we will use the [default one provided](https://github.com/gjaldon/heroku-buildpack-phoenix-static/blob/master/compile).
 
-Important: if using this buildpack, remove `phx.digest` and any `npm` command from the "assets.deploy" hook in your `mix.exs`, as the buildpack will automatically invoke those.
-
 Finally, note that since we are using multiple buildpacks, you might run into an issue where the sequence is out of order (the Elixir buildpack needs to run before the Phoenix Static buildpack). [Heroku's docs](https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app) explain this better, but you will need to make sure the Phoenix Static buildpack comes last.
 
 ## Making our Project ready for Heroku
diff --git a/lib/phoenix/socket.ex b/lib/phoenix/socket.ex
index d52ed13ea..9d7378fcc 100644
--- a/lib/phoenix/socket.ex
+++ b/lib/phoenix/socket.ex
@@ -10,8 +10,9 @@ defmodule Phoenix.Socket do
   It is the responsibility of the socket to tie transports and channels
   together.
 
-  By default, Phoenix supports both websockets and longpoll when invoking
-  `Phoenix.Endpoint.socket/3` in your endpoint:
+  Phoenix supports `websocket` and `longpoll` options when invoking
+  `Phoenix.Endpoint.socket/3` in your endpoint. `websocket` is set by default
+  and `longpoll` can also be configured explicitly.
 
       socket "/socket", MyAppWeb.Socket, websocket: true, longpoll: false
 


Test patch:
diff --git a/priv/templates/phx.gen.auth/session_controller_test.exs b/priv/templates/phx.gen.auth/session_controller_test.exs
index eec4b0b02..5f189f6a4 100644
--- a/priv/templates/phx.gen.auth/session_controller_test.exs
+++ b/priv/templates/phx.gen.auth/session_controller_test.exs
@@ -12,8 +12,8 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
       conn = get(conn, Routes.<%= schema.route_helper %>_session_path(conn, :new))
       response = html_response(conn, 200)
       assert response =~ "<h1>Log in</h1>"
-      assert response =~ "Log in</a>"
       assert response =~ "Register</a>"
+      assert response =~ "Forgot your password?</a>"
     end
 
     test "redirects if already logged in", %{conn: conn, <%= schema.singular %>: <%= schema.singular %>} do