diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index ddc425b1..00000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: # Replace with a single Patreon username -open_collective: # kaffy -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d186859..e47e9788 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: otp: ['22', '23', '24', '25'] - elixir: ['1.11.4', '1.12.3', '1.13.4', '1.14.5', '1.15.5'] + elixir: ['1.12.3', '1.13.4', '1.14.5', '1.15.5'] # Exclude invalid combinations of Elixir and OTP exclude: - otp: '22' @@ -22,8 +22,6 @@ jobs: elixir: '1.15.5' - otp: '23' elixir: '1.15.5' - - otp: '25' - elixir: '1.11.4' - otp: '25' elixir: '1.12.3' - otp: '25' diff --git a/CHANGELOG.md b/CHANGELOG.md index 9070dd4a..6a55094d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixes - Crash when updating records. +- Removes elixir and phoenix deprecation warnings [PR#288](https://github.com/aesmail/kaffy/pull/288) ### Added - Support for filtering `{:array, :string}` fielsd [PR#285](https://github.com/aesmail/kaffy/pull/262) diff --git a/README.md b/README.md index 89988e62..a91ac9a9 100644 --- a/README.md +++ b/README.md @@ -59,10 +59,18 @@ If you or your company wants to sponsor the development of Kaffy, please reach o ## Minimum Requirements -- Elixir 1.11.4 -- Phoenix 1.5.0 +Starting with v0.10.0, Kaffy will officially support the latest two phoenix versions. -We aim to follow Elixir's [support policy](https://hexdocs.pm/elixir/compatibility-and-deprecations.html) for the minimum required Elixir version. +| Kaffy | Supported phoenix versions | +|---------|----------------------------| +| v0.10.0 | 1.6, 1.7 | +| v0.9.X | 1.5, 1.6, 1.7 | +| | | + + +## Support Policy + +The latest released `major.minor` version will be supported. For example, if the latest version is `0.9.0`, then `0.9.1` will be released with bug fixes. If a new version `0.10.0` is released, then `0.9.1` will no longer receive bug fixes or security patches. ## Installation diff --git a/lib/kaffy/utils.ex b/lib/kaffy/utils.ex index dd023c20..95b61c3a 100644 --- a/lib/kaffy/utils.ex +++ b/lib/kaffy/utils.ex @@ -96,8 +96,15 @@ defmodule Kaffy.Utils do """ @spec get_version_of(atom()) :: String.t() def get_version_of(package) do - {:ok, version} = :application.get_key(package, :vsn) - to_string(version) + case package do + :elixir -> + System.version() + + _ -> + {:ok, version} = :application.get_key(package, :vsn) + version + end + |> to_string() end @doc """ @@ -469,4 +476,9 @@ defmodule Kaffy.Utils do def visible?(options) do Keyword.get(options, :in_menu, true) end + + def version_match?(app, version) do + get_version_of(app) + |> Version.match?(version) + end end diff --git a/lib/kaffy_web/templates/layout/app.html.eex b/lib/kaffy_web/templates/layout/app.html.eex index 83616969..e45b11ae 100644 --- a/lib/kaffy_web/templates/layout/app.html.eex +++ b/lib/kaffy_web/templates/layout/app.html.eex @@ -127,7 +127,7 @@
<%= if get_flash(@conn, :success) do %>
- Success: <%= get_flash(@conn, :success) %> + Success: <%= get_flash(@conn, :success) %>
<% end %> <%= if get_flash(@conn, :info) do %> @@ -146,11 +146,7 @@
<% end %> - <%= if Kaffy.Utils.phoenix_version?("1.4.") do %> - <%= render(@view_module, @view_template, assigns) %> - <% else %> - <%= @inner_content %> - <% end %> + <%= @inner_content %>