Skip to content

Commit

Permalink
Extend test matrix to cover supported versions (#5681)
Browse files Browse the repository at this point in the history
* Test against newest elixir & otp
* Test against oldest supported elixir (Changelog and mix say 1.11)
* Updated patch versions for elixir versions
* Fix accidental regression breaking elixir 1.11 support (then/2)
  • Loading branch information
PragTob authored Dec 29, 2023
1 parent 4b63d0e commit 5c768de
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@ jobs:
strategy:
matrix:
include:
- elixir: 1.12.0
- elixir: 1.11.4
otp: 22.3

- elixir: 1.14.3
otp: 25.1
- elixir: 1.12.3
otp: 23.3

- elixir: 1.14.5
otp: 25.3

- elixir: 1.16.0
otp: 26.2
lint: true
installer: true

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

See the [upgrade guide](https://gist.github.com/chrismccord/00a6ea2a96bc57df0cce526bd20af8a7) to upgrade from Phoenix 1.6.x.

Phoenix v1.7 requires Elixir v1.11+.
Phoenix v1.7 requires Elixir v1.11+ & Erlang v22.1+.

## Introduction of Verified Routes

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ See the official site at <https://www.phoenixframework.org/>.

Install the latest version of Phoenix by following the instructions at <https://hexdocs.pm/phoenix/installation.html#phoenix>.

Phoenix requires Elixir v1.11+ & Erlang v22.1+.

## Documentation

API documentation is available at <https://hexdocs.pm/phoenix>.
Expand Down
9 changes: 6 additions & 3 deletions lib/phoenix/endpoint/cowboy2_adapter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,12 @@ defmodule Phoenix.Endpoint.Cowboy2Adapter do
defp port_to_integer(port) when is_integer(port), do: port

def server_info(endpoint, scheme) do
make_ref(endpoint, scheme)
|> :ranch.get_addr()
|> then(&{:ok, &1})
address =
endpoint
|> make_ref(scheme)
|> :ranch.get_addr()

{:ok, address}
rescue
e -> {:error, e.message}
end
Expand Down

0 comments on commit 5c768de

Please sign in to comment.