Repository: phoenixframework/phoenix (elixir)

Issue:
Action block hover rendering breaks on multiline data
### Environment

* Elixir version (elixir -v): Elixir 1.17.0 (compiled with Erlang/OTP 27)
* Phoenix version (mix deps): phoenix 1.7.14
* Operating system: OSx

### Actual behavior

When there are more than one line in a cell action block renders incorrectly on hover (look at the right edge of `Delete` button)

<img width="955" alt="image" src="https://github.com/phoenixframework/phoenix/assets/39037/887bf08e-e0ea-424d-98a1-e34e63f42c73">


### Expected behavior

<img width="988" alt="image" src="https://github.com/phoenixframework/phoenix/assets/39037/1fc22389-4a54-4e3d-94b7-724848eb21f4">


Pull request:
#5852 Fix action block rendering for tables
Fixes #5852: action block rendering under hover when there is more than one line.

Patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f53c116fa..ea07f335a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -20,7 +20,7 @@ jobs:
             otp: 23.3
 
           - elixir: 1.14.5
-            otp: 25.3
+            otp: 25.3.2.9
 
           - elixir: 1.16.2
             otp: 26.2
diff --git a/installer/templates/phx_web/components/core_components.ex b/installer/templates/phx_web/components/core_components.ex
index 586ca1b30..cb4a7e074 100644
--- a/installer/templates/phx_web/components/core_components.ex
+++ b/installer/templates/phx_web/components/core_components.ex
@@ -502,8 +502,8 @@ defmodule <%= @web_namespace %>.CoreComponents do
               </div>
             </td>
             <td :if={@action != []} class="relative w-14 p-0">
+              <span class="absolute -inset-y-px -right-4 left-0 group-hover:bg-zinc-50 sm:rounded-r-xl" />
               <div class="relative whitespace-nowrap py-4 text-right text-sm font-medium">
-                <span class="absolute -inset-y-px -right-4 left-0 group-hover:bg-zinc-50 sm:rounded-r-xl" />
                 <span
                   :for={action <- @action}
                   class="relative ml-4 font-semibold leading-6 text-zinc-900 hover:text-zinc-700"
@@ -604,7 +604,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
       to: selector,
       time: 300,
       transition:
-        {"transition-all transform ease-out duration-300",
+        {"transition-all ease-out duration-300",
          "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
          "opacity-100 translate-y-0 sm:scale-100"}
     )
@@ -615,8 +615,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
       to: selector,
       time: 200,
       transition:
-        {"transition-all transform ease-in duration-200",
-         "opacity-100 translate-y-0 sm:scale-100",
+        {"transition-all ease-in duration-200", "opacity-100 translate-y-0 sm:scale-100",
          "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"}
     )
   end
@@ -627,7 +626,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
     |> JS.show(
       to: "##{id}-bg",
       time: 300,
-      transition: {"transition-all transform ease-out duration-300", "opacity-0", "opacity-100"}
+      transition: {"transition-all ease-out duration-300", "opacity-0", "opacity-100"}
     )
     |> show("##{id}-container")
     |> JS.add_class("overflow-hidden", to: "body")
@@ -638,7 +637,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
     js
     |> JS.hide(
       to: "##{id}-bg",
-      transition: {"transition-all transform ease-in duration-200", "opacity-100", "opacity-0"}
+      transition: {"transition-all ease-in duration-200", "opacity-100", "opacity-0"}
     )
     |> hide("##{id}-container")
     |> JS.hide(to: "##{id}", transition: {"block", "block", "hidden"})
diff --git a/lib/mix/tasks/phx.digest.clean.ex b/lib/mix/tasks/phx.digest.clean.ex
index f1b162114..9f5347aac 100644
--- a/lib/mix/tasks/phx.digest.clean.ex
+++ b/lib/mix/tasks/phx.digest.clean.ex
@@ -33,6 +33,8 @@ defmodule Mix.Tasks.Phx.Digest.Clean do
 
     * `--all` - specifies that all compiled assets (including the manifest)
       will be removed. Note this overrides the age and keep switches.
+
+    * `--no-compile` - do not run mix compile
   """
 
   @switches [output: :string, age: :integer, keep: :integer, all: :boolean]
@@ -41,7 +43,7 @@ defmodule Mix.Tasks.Phx.Digest.Clean do
   def run(all_args) do
     # Ensure all compressors are compiled.
     if "--no-compile" not in all_args do
-      Mix.Task.run("compile")
+      Mix.Task.run("compile", all_args)
     end
 
     {:ok, _} = Application.ensure_all_started(:phoenix)
diff --git a/lib/mix/tasks/phx.digest.ex b/lib/mix/tasks/phx.digest.ex
index e2386360a..8f1ce97fc 100644
--- a/lib/mix/tasks/phx.digest.ex
+++ b/lib/mix/tasks/phx.digest.ex
@@ -40,6 +40,15 @@ defmodule Mix.Tasks.Phx.Digest do
 
   It is possible to digest the stylesheet asset references without the query
   string "?vsn=d" with the option `--no-vsn`.
+
+  ## Options
+
+    * `-o, --output` - indicates the path to your compiled
+      assets directory. Defaults to `priv/static`
+
+    * `--no-vsn` - do not add version query string to assets
+
+    * `--no-compile` - do not run mix compile
   """
 
   @default_opts [vsn: true]
@@ -49,7 +58,7 @@ defmodule Mix.Tasks.Phx.Digest do
   def run(all_args) do
     # Ensure all compressors are compiled.
     if "--no-compile" not in all_args do
-      Mix.Task.run("compile")
+      Mix.Task.run("compile", all_args)
     end
 
     Mix.Task.reenable("phx.digest")
diff --git a/lib/mix/tasks/phx.routes.ex b/lib/mix/tasks/phx.routes.ex
index 9af49e333..ab8717a6c 100644
--- a/lib/mix/tasks/phx.routes.ex
+++ b/lib/mix/tasks/phx.routes.ex
@@ -97,10 +97,9 @@ defmodule Mix.Tasks.Phx.Routes do
     %{plug: plug, plug_opts: plug_opts} = meta
 
     {module, func_name} =
-      if log_mod = meta[:log_module] do
-        {log_mod, meta[:log_function]}
-      else
-        {plug, plug_opts}
+      case meta[:mfa] do
+        {mod, fun, _} -> {mod, fun}
+        _ -> {plug, plug_opts}
       end
 
     Mix.shell().info("Module: #{inspect(module)}")
diff --git a/lib/phoenix/logger.ex b/lib/phoenix/logger.ex
index 97f7fea7a..6a19b6a53 100644
--- a/lib/phoenix/logger.ex
+++ b/lib/phoenix/logger.ex
@@ -273,7 +273,6 @@ defmodule Phoenix.Logger do
   def phoenix_router_dispatch_start(_, _, metadata, _) do
     %{log: level, conn: conn, plug: plug} = metadata
     level = log_level(level, conn)
-    log_module = metadata[:log_module] || plug
 
     Logger.log(level, fn ->
       %{
@@ -281,10 +280,16 @@ defmodule Phoenix.Logger do
         plug_opts: plug_opts
       } = metadata
 
+      log_mfa =
+        case metadata[:mfa] do
+          {mod, fun, arity} -> mfa(mod, fun, arity)
+          _ when is_atom(plug_opts) -> mfa(plug, plug_opts, 2)
+          _ -> inspect(plug)
+        end
+
       [
         "Processing with ",
-        inspect(log_module),
-        maybe_action(plug_opts),
+        log_mfa,
         ?\n,
         "  Parameters: ",
         params(conn.params),
@@ -295,8 +300,8 @@ defmodule Phoenix.Logger do
     end)
   end
 
-  defp maybe_action(action) when is_atom(action), do: [?., Atom.to_string(action), ?/, ?2]
-  defp maybe_action(_), do: []
+  defp mfa(mod, fun, arity),
+    do: [inspect(mod), ?., Atom.to_string(fun), ?/, arity + ?0]
 
   defp params(%Plug.Conn.Unfetched{}), do: "[UNFETCHED]"
   defp params(params), do: params |> filter_values() |> inspect()
diff --git a/lib/phoenix/router.ex b/lib/phoenix/router.ex
index 3a9c01dbb..9725b1a21 100644
--- a/lib/phoenix/router.ex
+++ b/lib/phoenix/router.ex
@@ -601,9 +601,12 @@ defmodule Phoenix.Router do
 
     checks =
       routes
-      |> Enum.uniq_by(&{&1.line, &1.plug})
-      |> Enum.map(fn %{line: line, plug: plug} ->
-        quote line: line, do: _ = &unquote(plug).init/1
+      |> Enum.map(fn %{line: line, metadata: metadata, plug: plug} ->
+        {line, Map.get(metadata, :mfa, {plug, :init, 1})}
+      end)
+      |> Enum.uniq()
+      |> Enum.map(fn {line, {module, function, arity}} ->
+        quote line: line, do: _ = &(unquote(module).unquote(function) / unquote(arity))
       end)
 
     keys = [:verb, :path, :plug, :plug_opts, :helper, :metadata]
@@ -752,7 +755,8 @@ defmodule Phoenix.Router do
       when a route matches
     * `:assigns` - a map of data to merge into the connection when a route matches
     * `:metadata` - a map of metadata used by the telemetry events and returned by
-      `route_info/4`
+      `route_info/4`. The `:mfa` field is used by telemetry to print logs and by the
+      router to emit compile time checks. Custom fields may be added.
     * `:warn_on_verify` - the boolean for whether matches to this route trigger
       an unmatched route warning for `Phoenix.VerifiedRoutes`. It is useful to ignore
       an otherwise catch-all route definition from being matched when verifying routes.
diff --git a/lib/phoenix/router/console_formatter.ex b/lib/phoenix/router/console_formatter.ex
index 017219e1b..58f852818 100644
--- a/lib/phoenix/router/console_formatter.ex
+++ b/lib/phoenix/router/console_formatter.ex
@@ -19,45 +19,57 @@ defmodule Phoenix.Router.ConsoleFormatter do
   end
 
   defp format_endpoint(nil, _router, _), do: ""
+
   defp format_endpoint(endpoint, router, widths) do
     case endpoint.__sockets__() do
-      [] -> ""
+      [] ->
+        ""
+
       sockets ->
         Enum.map_join(sockets, "", fn socket ->
           format_websocket(socket, router, widths) <>
-          format_longpoll(socket, router, widths)
+            format_longpoll(socket, router, widths)
         end)
-      end
+    end
   end
 
   defp format_websocket({_path, Phoenix.LiveReloader.Socket, _opts}, _router, _), do: ""
+
   defp format_websocket({path, module, opts}, router, widths) do
     if opts[:websocket] != false do
       prefix = if router.__helpers__(), do: "websocket", else: ""
       {verb_len, path_len, route_name_len} = widths
 
-      String.pad_leading(prefix, route_name_len) <> "  " <>
-      String.pad_trailing(@socket_verb, verb_len) <> "  " <>
-      String.pad_trailing(path <> "/websocket", path_len) <> "  " <>
-      inspect(module) <>
-      "\n"
+      String.pad_leading(prefix, route_name_len) <>
+        "  " <>
+        String.pad_trailing(@socket_verb, verb_len) <>
+        "  " <>
+        String.pad_trailing(path <> "/websocket", path_len) <>
+        "  " <>
+        inspect(module) <>
+        "\n"
     else
       ""
     end
   end
 
   defp format_longpoll({_path, Phoenix.LiveReloader.Socket, _opts}, _router, _), do: ""
+
   defp format_longpoll({path, module, opts}, router, widths) do
     if opts[:longpoll] != false do
       prefix = if router.__helpers__(), do: "longpoll", else: ""
+
       for method <- @longpoll_verbs, into: "" do
         {verb_len, path_len, route_name_len} = widths
 
-        String.pad_leading(prefix, route_name_len) <> "  " <>
-        String.pad_trailing(method, verb_len) <> "  " <>
-        String.pad_trailing(path <> "/longpoll", path_len) <> "  " <>
-        inspect(module) <>
-        "\n"
+        String.pad_leading(prefix, route_name_len) <>
+          "  " <>
+          String.pad_trailing(method, verb_len) <>
+          "  " <>
+          String.pad_trailing(path <> "/longpoll", path_len) <>
+          "  " <>
+          inspect(module) <>
+          "\n"
       end
     else
       ""
@@ -65,7 +77,7 @@ defmodule Phoenix.Router.ConsoleFormatter do
   end
 
   defp calculate_column_widths(router, routes, endpoint) do
-    sockets = endpoint && endpoint.__sockets__() || []
+    sockets = (endpoint && endpoint.__sockets__()) || []
 
     widths =
       Enum.reduce(routes, {0, 0, 0}, fn route, acc ->
@@ -73,36 +85,54 @@ defmodule Phoenix.Router.ConsoleFormatter do
         verb = verb_name(verb)
         {verb_len, path_len, route_name_len} = acc
         route_name = route_name(router, helper)
-        {max(verb_len, String.length(verb)),
-        max(path_len, String.length(path)),
-        max(route_name_len, String.length(route_name))}
+
+        {max(verb_len, String.length(verb)), max(path_len, String.length(path)),
+         max(route_name_len, String.length(route_name))}
       end)
 
     Enum.reduce(sockets, widths, fn {path, _mod, opts}, acc ->
       {verb_len, path_len, route_name_len} = acc
       prefix = if router.__helpers__(), do: "websocket", else: ""
-      verb_length = socket_verbs(opts) |> Enum.map(&String.length/1) |> Enum.max(&>=/2, fn -> 0 end)
 
-      {max(verb_len, verb_length),
-      max(path_len, String.length(path <> "/websocket")),
-      max(route_name_len, String.length(prefix))}
+      verb_length =
+        socket_verbs(opts) |> Enum.map(&String.length/1) |> Enum.max(&>=/2, fn -> 0 end)
+
+      {max(verb_len, verb_length), max(path_len, String.length(path <> "/websocket")),
+       max(route_name_len, String.length(prefix))}
     end)
   end
 
   defp format_route(route, router, column_widths) do
-    %{verb: verb, path: path, plug: plug, metadata: metadata, plug_opts: plug_opts, helper: helper} = route
+    %{
+      verb: verb,
+      path: path,
+      plug: plug,
+      metadata: metadata,
+      plug_opts: plug_opts,
+      helper: helper
+    } = route
+
     verb = verb_name(verb)
     route_name = route_name(router, helper)
     {verb_len, path_len, route_name_len} = column_widths
-    log_module = metadata[:log_module] || plug
 
-    String.pad_leading(route_name, route_name_len) <> "  " <>
-    String.pad_trailing(verb, verb_len) <> "  " <>
-    String.pad_trailing(path, path_len) <> "  " <>
-    "#{inspect(log_module)} #{inspect(plug_opts)}\n"
+    log_module =
+      case metadata[:mfa] do
+        {mod, _fun, _arity} -> mod
+        _ -> plug
+      end
+
+    String.pad_leading(route_name, route_name_len) <>
+      "  " <>
+      String.pad_trailing(verb, verb_len) <>
+      "  " <>
+      String.pad_trailing(path, path_len) <>
+      "  " <>
+      "#{inspect(log_module)} #{inspect(plug_opts)}\n"
   end
 
-  defp route_name(_router, nil),  do: ""
+  defp route_name(_router, nil), do: ""
+
   defp route_name(router, name) do
     if router.__helpers__() do
       name <> "_path"
diff --git a/priv/templates/phx.gen.live/core_components.ex b/priv/templates/phx.gen.live/core_components.ex
index 586ca1b30..cb4a7e074 100644
--- a/priv/templates/phx.gen.live/core_components.ex
+++ b/priv/templates/phx.gen.live/core_components.ex
@@ -502,8 +502,8 @@ defmodule <%= @web_namespace %>.CoreComponents do
               </div>
             </td>
             <td :if={@action != []} class="relative w-14 p-0">
+              <span class="absolute -inset-y-px -right-4 left-0 group-hover:bg-zinc-50 sm:rounded-r-xl" />
               <div class="relative whitespace-nowrap py-4 text-right text-sm font-medium">
-                <span class="absolute -inset-y-px -right-4 left-0 group-hover:bg-zinc-50 sm:rounded-r-xl" />
                 <span
                   :for={action <- @action}
                   class="relative ml-4 font-semibold leading-6 text-zinc-900 hover:text-zinc-700"
@@ -604,7 +604,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
       to: selector,
       time: 300,
       transition:
-        {"transition-all transform ease-out duration-300",
+        {"transition-all ease-out duration-300",
          "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
          "opacity-100 translate-y-0 sm:scale-100"}
     )
@@ -615,8 +615,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
       to: selector,
       time: 200,
       transition:
-        {"transition-all transform ease-in duration-200",
-         "opacity-100 translate-y-0 sm:scale-100",
+        {"transition-all ease-in duration-200", "opacity-100 translate-y-0 sm:scale-100",
          "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"}
     )
   end
@@ -627,7 +626,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
     |> JS.show(
       to: "##{id}-bg",
       time: 300,
-      transition: {"transition-all transform ease-out duration-300", "opacity-0", "opacity-100"}
+      transition: {"transition-all ease-out duration-300", "opacity-0", "opacity-100"}
     )
     |> show("##{id}-container")
     |> JS.add_class("overflow-hidden", to: "body")
@@ -638,7 +637,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
     js
     |> JS.hide(
       to: "##{id}-bg",
-      transition: {"transition-all transform ease-in duration-200", "opacity-100", "opacity-0"}
+      transition: {"transition-all ease-in duration-200", "opacity-100", "opacity-0"}
     )
     |> hide("##{id}-container")
     |> JS.hide(to: "##{id}", transition: {"block", "block", "hidden"})
diff --git a/priv/templates/phx.gen.release/Dockerfile.eex b/priv/templates/phx.gen.release/Dockerfile.eex
index 299a907b8..b561ac650 100644
--- a/priv/templates/phx.gen.release/Dockerfile.eex
+++ b/priv/templates/phx.gen.release/Dockerfile.eex
@@ -44,7 +44,9 @@ RUN mkdir config
 # to be re-compiled.
 COPY config/config.exs config/${MIX_ENV}.exs config/
 RUN mix deps.compile
-
+<%= if assets_dir_exists? do %>
+RUN mix assets.setup
+<% end %>
 COPY priv priv
 
 COPY lib lib


Test patch:
diff --git a/test/mix/tasks/phx.digest_test.exs b/test/mix/tasks/phx.digest_test.exs
index 82805dbcd..6593cbff3 100644
--- a/test/mix/tasks/phx.digest_test.exs
+++ b/test/mix/tasks/phx.digest_test.exs
@@ -5,7 +5,7 @@ defmodule Mix.Tasks.Phx.DigestTest do
   import MixHelper
 
   test "logs when the path is invalid" do
-    Mix.Tasks.Phx.Digest.run(["invalid_path", "--no-deps-check", "--no-compile"])
+    Mix.Tasks.Phx.Digest.run(["invalid_path", "--no-compile"])
     assert_received {:mix_shell, :error, ["The input path \"invalid_path\" does not exist"]}
   end
 
@@ -13,7 +13,7 @@ defmodule Mix.Tasks.Phx.DigestTest do
   test "digests and compress files" do
     in_tmp @output_path, fn ->
       File.mkdir_p!("priv/static")
-      Mix.Tasks.Phx.Digest.run(["priv/static", "-o", @output_path, "--no-deps-check", "--no-compile"])
+      Mix.Tasks.Phx.Digest.run(["priv/static", "-o", @output_path, "--no-compile"])
       assert_received {:mix_shell, :info, ["Check your digested files at \"mix_phoenix_digest\""]}
     end
   end
@@ -22,7 +22,7 @@ defmodule Mix.Tasks.Phx.DigestTest do
   test "digests and compress files without the input path" do
     in_tmp @output_path, fn ->
       File.mkdir_p!("priv/static")
-      Mix.Tasks.Phx.Digest.run(["-o", @output_path, "--no-deps-check", "--no-compile"])
+      Mix.Tasks.Phx.Digest.run(["-o", @output_path, "--no-compile"])
       assert_received {:mix_shell, :info, ["Check your digested files at \"mix_phoenix_digest_no_input\""]}
     end
   end
@@ -31,7 +31,7 @@ defmodule Mix.Tasks.Phx.DigestTest do
   test "uses the input path as output path when no output path is given" do
     in_tmp @input_path, fn ->
       File.mkdir_p!(@input_path)
-      Mix.Tasks.Phx.Digest.run([@input_path, "--no-deps-check", "--no-compile"])
+      Mix.Tasks.Phx.Digest.run([@input_path, "--no-compile"])
       assert_received {:mix_shell, :info, ["Check your digested files at \"input_path\""]}
     end
   end
diff --git a/test/mix/tasks/phx.gen.release_test.exs b/test/mix/tasks/phx.gen.release_test.exs
index 30386eba2..9ea1319f0 100644
--- a/test/mix/tasks/phx.gen.release_test.exs
+++ b/test/mix/tasks/phx.gen.release_test.exs
@@ -123,8 +123,9 @@ defmodule Mix.Tasks.Phx.Gen.ReleaseTest do
       Gen.Release.run(["--docker"])
 
       assert_file("Dockerfile", fn file ->
+        assert file =~ ~S|RUN mix assets.setup|
         assert file =~ ~S|COPY assets assets|
-        assert file =~ ~S|mix assets.deploy|
+        assert file =~ ~S|RUN mix assets.deploy|
       end)
     end)
   end
@@ -134,8 +135,9 @@ defmodule Mix.Tasks.Phx.Gen.ReleaseTest do
       Gen.Release.run(["--docker"])
 
       assert_file("Dockerfile", fn file ->
+        refute file =~ ~S|RUN mix assets.setup|
         refute file =~ ~S|COPY assets assets|
-        refute file =~ ~S|mix assets.deploy|
+        refute file =~ ~S|RUN mix assets.deploy|
       end)
     end)
   end
diff --git a/test/mix/tasks/phx.routes_test.exs b/test/mix/tasks/phx.routes_test.exs
index 7db1f46a9..e044fc868 100644
--- a/test/mix/tasks/phx.routes_test.exs
+++ b/test/mix/tasks/phx.routes_test.exs
@@ -1,8 +1,12 @@
-Code.require_file "../../../installer/test/mix_helper.exs", __DIR__
+Code.require_file("../../../installer/test/mix_helper.exs", __DIR__)
 
 defmodule PageController do
   def init(opts), do: opts
   def call(conn, _opts), do: conn
+
+  defmodule Live do
+    def init(opts), do: opts
+  end
 end
 
 defmodule PhoenixTestWeb.Router do
@@ -17,7 +21,7 @@ end
 
 defmodule PhoenixTestLiveWeb.Router do
   use Phoenix.Router
-  get "/", PageController, :index, metadata: %{log_module: PageLive.Index}
+  get "/", PageController, :index, metadata: %{mfa: {PageController.Live, :init, 1}}
 end
 
 defmodule Mix.Tasks.Phx.RoutesTest do
@@ -30,9 +34,11 @@ defmodule Mix.Tasks.Phx.RoutesTest do
   end
 
   test "prints error when explicit router cannot be found" do
-    assert_raise Mix.Error, "the provided router, Foo.UnknownBar.CantFindBaz, does not exist", fn ->
-      Mix.Tasks.Phx.Routes.run(["Foo.UnknownBar.CantFindBaz", "--no-compile"])
-    end
+    assert_raise Mix.Error,
+                 "the provided router, Foo.UnknownBar.CantFindBaz, does not exist",
+                 fn ->
+                   Mix.Tasks.Phx.Routes.run(["Foo.UnknownBar.CantFindBaz", "--no-compile"])
+                 end
   end
 
   test "prints error when implicit router cannot be found" do
@@ -53,9 +59,9 @@ defmodule Mix.Tasks.Phx.RoutesTest do
     assert routes =~ "page_path  GET  /old  PageController :index"
   end
 
-  test "overrides module name for route with :log_module metadata" do
+  test "overrides module name for route with :mfa metadata" do
     Mix.Tasks.Phx.Routes.run(["PhoenixTestLiveWeb.Router", "--no-compile"])
     assert_received {:mix_shell, :info, [routes]}
-    assert routes =~ "page_path  GET  /  PageLive.Index :index"
+    assert routes =~ "page_path  GET  /  PageController.Live :index"
   end
 end
diff --git a/test/phoenix/router/routing_test.exs b/test/phoenix/router/routing_test.exs
index 58ab37ada..fa015fc8c 100644
--- a/test/phoenix/router/routing_test.exs
+++ b/test/phoenix/router/routing_test.exs
@@ -67,7 +67,7 @@ defmodule Phoenix.Router.RoutingTest do
 
     get "/no_log", SomePlug, [], log: false
     get "/fun_log", SomePlug, [], log: {LogLevel, :log_level, []}
-    get "/override-plug-name", SomePlug, :action, metadata: %{log_module: PlugOverride}
+    get "/override-plug-name", SomePlug, :action, metadata: %{mfa: {LogLevel, :log_level, 1}}
     get "/users/:user_id/files/:id", UserController, :image
 
     scope "/halt-plug" do
@@ -283,7 +283,7 @@ defmodule Phoenix.Router.RoutingTest do
 
     test "overrides plug name that processes the route when set in metadata" do
       assert capture_log(fn -> call(Router, :get, "/override-plug-name") end) =~
-               "Processing with PlugOverride"
+               "Processing with Phoenix.Router.RoutingTest.LogLevel.log_level/1"
     end
 
     test "logs custom level when log is set to a 1-arity function" do