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 6437282b..6445a763 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}` fields [PR#285](https://github.com/aesmail/kaffy/pull/262) diff --git a/README.md b/README.md index dd38b3b7..dbf36168 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 572c54df..7820131c 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 """ @@ -482,4 +489,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 70fd0290..fefcdc1c 100644 --- a/lib/kaffy_web/templates/layout/app.html.eex +++ b/lib/kaffy_web/templates/layout/app.html.eex @@ -130,7 +130,7 @@