Skip to content

Commit

Permalink
Fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
alanvardy committed Mar 3, 2024
1 parent 20e104a commit 9a8368f
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 11 deletions.
4 changes: 3 additions & 1 deletion lib/exzeitable.ex
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ defmodule Exzeitable do

quote do
use Phoenix.LiveView
use Phoenix.HTML
import Phoenix.HTML
import Phoenix.HTML.Form
use PhoenixHTMLHelpers
import Ecto.Query
alias Phoenix.LiveView.Helpers
alias Exzeitable.{Database, Filter, Format, HTML, Params, Validation}
Expand Down
2 changes: 1 addition & 1 deletion lib/exzeitable/html.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Exzeitable.HTML do
For building the HTML tags themselves, check CSS.md for information on applying CSS classes.
"""

use Phoenix.HTML
use PhoenixHTMLHelpers
alias Exzeitable.HTML.{ActionButton, Pagination, Search, ShowButton, Table}
alias Exzeitable.Params

Expand Down
2 changes: 1 addition & 1 deletion lib/exzeitable/html/action_button.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ defmodule Exzeitable.HTML.ActionButton do
"""

alias Exzeitable.{Params, Text}
alias Phoenix.HTML.Link
alias Phoenix.LiveView.Socket
alias PhoenixHTMLHelpers.Link

@typedoc "Controller action"
@type action :: :new | :delete | :show | :edit
Expand Down
2 changes: 1 addition & 1 deletion lib/exzeitable/html/helpers.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Exzeitable.HTML.Helpers do
@moduledoc "Helpers that are needed across multiple modules in the HTML context"

alias Phoenix.HTML.Tag
alias PhoenixHTMLHelpers.Tag

@doc "Replacement for content_tag to make it easier to pipe HTML chunks into each other"
@spec tag(any, atom, keyword) :: {:safe, iolist}
Expand Down
2 changes: 1 addition & 1 deletion lib/exzeitable/html/search.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Exzeitable.HTML.Search do

alias Exzeitable.HTML.Helpers
alias Exzeitable.{Params, Text}
alias Phoenix.HTML.Form
alias PhoenixHTMLHelpers.Form

@doc "Returns the HTML search form"
@spec build(map) :: {:safe, iolist}
Expand Down
2 changes: 1 addition & 1 deletion lib/exzeitable/html/table.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Exzeitable.HTML.Table do
@moduledoc "Builds the table part of the HTML"
alias Exzeitable.{Params, Text}
alias Exzeitable.HTML.{ActionButton, Filter, Format, Helpers}
alias Phoenix.HTML.Link
alias PhoenixHTMLHelpers.Link

@doc "Output the table as HTML"
@spec build(map) :: {:safe, iolist}
Expand Down
4 changes: 3 additions & 1 deletion lib/test_web.ex
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ defmodule TestWeb do
import Phoenix.Controller, only: [get_flash: 1, get_flash: 2, view_module: 1]

# Use all HTML functionality (forms, tags, etc)
use Phoenix.HTML
import Phoenix.HTML
import Phoenix.HTML.Form
use PhoenixHTMLHelpers

import TestWeb.ErrorHelpers
import TestWeb.Gettext
Expand Down
1 change: 0 additions & 1 deletion lib/test_web/templates/layout/root.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<%= csrf_meta_tag() %>
<%= live_title_tag(assigns[:page_title] || "PhxNew", suffix: " · Phoenix Framework") %>
<link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/assets/app.css")} />
<script
defer
Expand Down
2 changes: 1 addition & 1 deletion lib/test_web/views/error_helpers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule TestWeb.ErrorHelpers do
Conveniences for translating and building error messages.
"""

use Phoenix.HTML
use PhoenixHTMLHelpers

@doc """
Generates tag for inlined form input errors.
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ defmodule Exzeitable.MixProject do
{:phoenix_ecto, "~> 4.4"},
{:ecto_sql, "~> 3.6"},
{:postgrex, ">= 0.0.0"},
{:phoenix_html, "~> 4.1"},
{:phoenix_html_helpers, "~> 1.0"},
{:phoenix_view, "~> 2.0"},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:phoenix_live_view, "~> 0.20.0"},
Expand Down
3 changes: 2 additions & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"parse_trans": {:hex, :parse_trans, "3.4.1", "6e6aa8167cb44cc8f39441d05193be6e6f4e7c2946cb2759f015f8c56b76e5ff", [:rebar3], [], "hexpm", "620a406ce75dada827b82e453c19cf06776be266f5a67cff34e1ef2cbb60e49a"},
"phoenix": {:hex, :phoenix, "1.7.11", "1d88fc6b05ab0c735b250932c4e6e33bfa1c186f76dcf623d8dd52f07d6379c7", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.7", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "b1ec57f2e40316b306708fe59b92a16b9f6f4bf50ccfa41aa8c7feb79e0ec02a"},
"phoenix_ecto": {:hex, :phoenix_ecto, "4.4.3", "86e9878f833829c3f66da03d75254c155d91d72a201eb56ae83482328dc7ca93", [:mix], [{:ecto, "~> 3.5", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "d36c401206f3011fefd63d04e8ef626ec8791975d9d107f9a0817d426f61ac07"},
"phoenix_html": {:hex, :phoenix_html, "4.1.0", "bafbb54edc5cda2071988b91b785132cc282d315101823867a59ec4b6c4ec440", [:mix], [], "hexpm", "29ea53cf3ae0f918f84a8d46f2321cf672acd6f6b2682895cd4bbe3c908ef33b"},
"phoenix_html": {:hex, :phoenix_html, "4.1.1", "4c064fd3873d12ebb1388425a8f2a19348cef56e7289e1998e2d2fa758aa982e", [:mix], [], "hexpm", "f2f2df5a72bc9a2f510b21497fd7d2b86d932ec0598f0210fed4114adc546c6f"},
"phoenix_html_helpers": {:hex, :phoenix_html_helpers, "1.0.1", "7eed85c52eff80a179391036931791ee5d2f713d76a81d0d2c6ebafe1e11e5ec", [:mix], [{:phoenix_html, "~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "cffd2385d1fa4f78b04432df69ab8da63dc5cf63e07b713a4dcf36a3740e3090"},
"phoenix_live_reload": {:hex, :phoenix_live_reload, "1.5.0", "4d9aec15bdf0c83ca12818f363e02be86520846c15816684176d84c9c4de062e", [:mix], [{:file_system, "~> 0.3 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "577ba22de3213921d429dfb0cc6e2df426c28ffec6acb79746a2bc822bda39d9"},
"phoenix_live_view": {:hex, :phoenix_live_view, "0.20.11", "63975ad42e09f21ad0db53e6ee449804c844995019d133fee275900f29e4a099", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "56eb5a75e0981ce362b0daf50a6c1a6385863a767db3ae06ae17461458da0bc8"},
"phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"},
Expand Down

0 comments on commit 9a8368f

Please sign in to comment.