Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
sasa1977 committed Mar 22, 2024
1 parent 1bf4020 commit 88146db
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Changelog

## 0.6.0

**Breaking**: changed the endpoint setup. Previously the client code had to configure https via the `Phoenix.Endpoint.init/2` callback. However, this callback is deprecated in the latest Phoenix, which now favours passing endpoint options via an argument to `start_link/1` (or `child_spec/1`). This style was previously not supported by site_encrypt.

So to make all of this work, the setup flow has been changed and simplified. To upgrade from the previous version you need to do the following:

1. Remove `use SiteEncrypt.Phoenix` from the endpoint module.
1. Replace `use Phoenix.Endpoint` with `use SiteEncrypt.Phoenix.Endpoint`. Keep the `:otp_app` option.
1. Remove invocation of `SiteEncrypt.Phoenix.configure_https/1` from your endpoint's `init/1`.
1. In the parent supervisor children list, replace the child `{SiteEncrypt.Phoenix, MyEndpoint}` with `MyEndpoint`.

Note that `init/1` callback is deprecated. To specify endpoint config at runtime, you can use the spec `{MyEndpoint, endpoint_config}`. Alternatively, you can override the `child_spec/1` function in the endpoint module:

```elixir
# in your endpoint module

defoverridable child_spec: 1

def child_spec(_arg) do
endpoint_config = [
http: [...],
https: [...],
...
]

super(endpoint_config)
end
```

## 0.5.1

- Support bandit 1.x
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ A basic demo Phoenix project is available [here](https://github.com/sasa1977/sit
defp deps do
[
# ...
{:site_encrypt, "~> 0.5"}
{:site_encrypt, "~> 0.6"}
]
end
end
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule SiteEncrypt.MixProject do
use Mix.Project

@version "0.5.1"
@version "0.6.0"

def project do
[
Expand Down

0 comments on commit 88146db

Please sign in to comment.