Skip to content

Commit f90281e

Browse files
authored
Require Elixir 1.13+, Erlang/OTP 25+ for cacerts (#202)
1 parent 9618d88 commit f90281e

File tree

4 files changed

+21
-23
lines changed

4 files changed

+21
-23
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
test:
1111
name: "test ${{ matrix.db }} ${{ matrix.pair.elixir }}/${{ matrix.pair.otp }} ${{ matrix.lint }}"
12-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-22.04
1313
strategy:
1414
fail-fast: false
1515
matrix:
@@ -19,21 +19,14 @@ jobs:
1919
- mysql:8.0
2020
- mariadb:10.3
2121
pair:
22-
- elixir: 1.11.3
23-
otp: 23.2.5
24-
- elixir: 1.16.2
25-
otp: 26.2.5
22+
- elixir: 1.13
23+
otp: 25.3
2624
include:
2725
- db: mysql:8.0
2826
pair:
29-
elixir: 1.16.2
30-
otp: 26.2.5
27+
elixir: 1.18.3
28+
otp: 27.3.3
3129
lint: lint
32-
33-
- db: mysql:8.0
34-
pair:
35-
elixir: 1.7.4
36-
otp: 21.3.8.24
3730
env:
3831
MIX_ENV: test
3932
DB: ${{ matrix.db }}
@@ -44,14 +37,14 @@ jobs:
4437
- run: docker run -p 3306:3306 --volume /var/run/mysqld:/var/run/mysqld -e MYSQL_ALLOW_EMPTY_PASSWORD=1 --detach ${{matrix.db}} --innodb_log_file_size=1G
4538
- run: until mysql --port 3306 --protocol=tcp -u root -e "SELECT @@version;"; do sleep 3; done
4639

47-
- uses: actions/checkout@v2
40+
- uses: actions/checkout@v4
4841

4942
- uses: erlef/setup-beam@v1
5043
with:
5144
otp-version: ${{matrix.pair.otp}}
5245
elixir-version: ${{matrix.pair.elixir}}
5346

54-
- uses: actions/cache@v2
47+
- uses: actions/cache@v4
5548
with:
5649
path: |
5750
deps

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v0.8.0-dev
4+
5+
* Require Elixir 1.13+
6+
37
## v0.7.1 (2024-07-05)
48

59
* Add `:ER_CHECK_CONSTRAINT_VIOLATED` error code

lib/myxql/client.ex

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,14 @@ defmodule MyXQL.Client do
4141
{nil, opts}
4242

4343
{true, opts} ->
44-
Logger.warning(
45-
"setting ssl: true on your database connection offers only limited protection, " <>
46-
"as the server's certificate is not verified. Set \"ssl: [cacertfile: \"/path/to/cacert.crt\"]\" instead"
47-
)
48-
49-
# Read ssl_opts for backwards compatibility
50-
Keyword.pop(opts, :ssl_opts, [])
44+
case Keyword.pop(opts, :ssl_opts) do
45+
{nil, _opts} ->
46+
[cacerts: :public_key.cacerts_get()] ++ default_ssl_opts()
47+
48+
{ssl_opts, opts} ->
49+
Logger.warning(":ssl_opts is deprecated, pass opts to :ssl instead")
50+
{ssl_opts, opts}
51+
end
5152

5253
{ssl_opts, opts} when is_list(ssl_opts) ->
5354
{Keyword.merge(default_ssl_opts(), ssl_opts), opts}

mix.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
defmodule MyXQL.MixProject do
22
use Mix.Project
33

4-
@version "0.7.1"
4+
@version "0.8.0-dev"
55
@source_url "https://github.com/elixir-ecto/myxql"
66

77
def project() do
88
[
99
app: :myxql,
1010
version: @version,
11-
elixir: "~> 1.7",
11+
elixir: "~> 1.13",
1212
start_permanent: Mix.env() == :prod,
1313
name: "MyXQL",
1414
description: "MySQL 5.5+ driver for Elixir",

0 commit comments

Comments
 (0)