Skip to content

Commit

Permalink
Merge branch 'main' into add-autocomplete-attrs-for-inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
SteffenDE authored Nov 26, 2024
2 parents a1c45b5 + 086b837 commit aa442fb
Show file tree
Hide file tree
Showing 268 changed files with 14,480 additions and 16,643 deletions.
76 changes: 54 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,25 @@ jobs:
strategy:
matrix:
include:
- elixir: 1.12.0
otp: 22.3
- elixir: 1.11.4
otp: 24.3

- elixir: 1.14.3
otp: 25.1
- elixir: 1.12.3
otp: 24.3

- elixir: 1.14.5
otp: 25.3.2.9

- elixir: 1.17.3
otp: 27.1
lint: true
installer: true

runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Elixir
uses: erlef/setup-beam@v1
Expand All @@ -34,7 +40,7 @@ jobs:
otp-version: ${{ matrix.otp }}

- name: Restore deps and _build cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
deps
Expand Down Expand Up @@ -67,10 +73,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Restore deps and _build cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
deps
Expand All @@ -79,13 +85,13 @@ jobs:
restore-keys: |
deps-${{ runner.os }}-npm
- name: Set up Node.js 12.x
uses: actions/setup-node@v3
- name: Set up Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 12.x
node-version: 20.x

- name: Restore npm cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -100,18 +106,44 @@ jobs:
integration-test-elixir:
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1

strategy:
fail-fast: false
matrix:
include:
- elixir: 1.14.0
otp: 24.3.4
# look for correct alpine image here: https://hub.docker.com/r/hexpm/elixir/tags
- elixir: 1.15.8
otp: 24.3.4.17
suffix: "alpine-3.20.3"

- elixir: 1.17.3
otp: 27.1.2
suffix: "alpine-3.20.3"

container:
image: hexpm/elixir:${{ matrix.elixir }}-erlang-${{ matrix.otp }}-${{ matrix.suffix }}
env:
ELIXIR_ASSERT_TIMEOUT: 10000
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
mysql:
image: mysql
ports:
- 3306:3306
env:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
ACCEPT_EULA: Y
SA_PASSWORD: some!Password
ports:
- 1433:1433
steps:
- uses: actions/checkout@v3
- name: Download released earth
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.5.16/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Execute tests
run: earthly -P --build-arg ELIXIR=${{ matrix.elixir }} --build-arg OTP=${{ matrix.otp }} +integration-test
- uses: actions/checkout@v4
- name: Run test script
run: ./integration_test/test.sh
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@

erl_crash.dump
phoenix-*.ez

.DS_Store
107 changes: 98 additions & 9 deletions 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 All @@ -13,7 +13,7 @@ Use of the `sigil_p` macro allows paths and URLs throughout your
application to be compile-time verified against your Phoenix router(s).
For example the following path and URL usages:

<.link href={~p"/sessions/new"} method="post">Sign in</.link>
<.link href={~p"/sessions/new"} method="post">Log in</.link>

redirect(to: url(~p"/posts/#{post}"))

Expand Down Expand Up @@ -46,26 +46,115 @@ styled with Tailwind CSS by default. You can opt-out of Tailwind CSS with the `-
flag (the Tailwind CSS classes are kept in the generated components as reference for
future styling).

## 1.7.8
## 1.7.14 (2024-06-18)

### Bug Fixes
* Fix `mix phx.gen.release --docker` failing with `:http_util` error on Elixir v1.15
### Bug fixes
* Revert "Add `follow_redirect/2` to Phoenix.ConnTest" (#5797) as this conflicts with `follow_redirect/2` in LiveView, which is imported with ConnTest by default

## 1.7.13 (2024-06-18)

### Bug fixes
* Fix Elixir 1.17 warning in Cowboy2Adapter
* Fix verified routes emitting diagnostics without file and position

### JavaScript Client Bug Fixes
* Fix error when `sessionStorage` is not available on global namespace

### Enhancements
* Add `follow_redirect/2` to Phoenix.ConnTest
* Use LiveView 1.0.0-rc for newly generated applications
* Use new `Phoenix.Component.used_input?` for form errors in generated `core_components.ex`
* Allow `mix ecto.setup` from the umbrella root
* Bump Endpoint static cache manifest on `config_change` callback

## 1.7.12 (2024-04-11)

### JavaScript Client Bug Fixes
* Fix all unjoined channels from being removed from the socket when channel leave is called on any single unjoined channel instance

### Enhancements
* [phx.gen.auth] Add enhanced session fixation protection.
For applications whichs previously used `phx.gen.auth`, the following line can be added to the `renew_session` function in the auth module:

```diff
defp renew_session(conn) do
+ delete_csrf_token()

conn
|> configure_session(renew: true)
|> clear_session()
```

*Note*: because the session id is in a http-only cookie by default, the only way to perform this attack prior to this change is if your application was already vulnerable to an XSS attack, which itself grants more escalated "privileges” than the CSRF fixation.

### JavaScript Client Enhancements
* Only memorize longpoll fallback for browser session if WebSocket never had a successful connection

## 1.7.11 (2024-02-01)

## Enhancements
### Enhancements
* [phx.new] Default to the [Bandit webserver](https://github.com/mtrudel/bandit) for newly generated applications
* [phx.new] Enable longpoll transport by default and auto fallback when websocket fails for newly generated applications

### JavaScript Client Enhancements
* Support new `longPollFallbackMs` option to auto fallback when websocket fails to connect
* Support new `debug` option to enable verbose logging

### Deprecations
* Deprecate the `c:init/2` callback in endpoints in favor of `config/runtime.exs` or in favor of `{Phoenix.Endpoint, options}`

## 1.7.10 (2023-11-03)

### Bug fixes
* [phx.new] Fix `CoreComponents.flash` generating incorrect id's causing flash messages to fail to be closed when clicked

### Enhancements
* [Phoenix.Endpoint] Support dynamic port for `Endpoint.url/0`

## 1.7.9 (2023-10-11)

### Bug fixes
* [Phoenix.CodeReloader] - Fix error in code reloader causing compilation errors
* [phx.new] – fix LiveView debug heex configuration being generated when `--no-html` pas passed

## 1.7.8 (2023-10-09)

### Bug fixes
* [Phoenix.ChannelTest] Stringify lists when pushing data
* [Phoenix.Controller] Fix filename when sending downloads with non-ascii names
* [Phoenix.CodeReloader] Remove duplicate warnings on recent Elixir versions
* [Phoenix.CodeReloader] Do not crash code reloader if file information is missing from diagnostic
* [Phoenix.Logger] Do not crash when status is atom
* [phx.gen.release] Fix `mix phx.gen.release --docker` failing with `:http_util` error on Elixir v1.15
* [phx.gen.*] Skip map inputs in generated forms as there is no trivial matching input
* [phx.new] Fix tailwind/esbuild config and paths in umbrella projects
* [phx.new] Do not render `th` for actions if actions are empty

### Enhancements
* [Phoenix] Allow latest `plug_crypto`
* [Phoenix.Endpoint] Support dynamic socket drainer configuration
* [Phoenix.Logger] Change socket serializer/version logs to warning
* [Phoenix.VerifiedRoutes] Add support for static resources with fragments in `~p`
* [phx.new] Add `--adapter` flag for generating application with webservers like bandit
* [phx.gen.schema] Support `--repo` and `--migration-dir` flags
* [phx.new] Allow `<.input type="checkbox">` without `value` attr in core components
* [phx.new] Allow UTC datetimes in the generators
* [phx.new] Automatically migrate when release starts when using sqlite 3
* [phx.new] Allow ID to be assigned in flash component
* [phx.new] Add `--adapter` flag for generating application with bandit
* [phx.new] Include DNSCluster for simple clustering
* [phx.routes] Support `--method` option

## 1.7.7 (2023-07-10)

## Enhancements
### Enhancements
* Support incoming binary payloads to channels over longpoll transport

## 1.7.6 (2023-06-16)

### Bug Fixes
* Support websock_adapter 0.5.3

## Enhancements
### Enhancements
* Allow using Phoenix.ChannelTest socket/connect in another process

## 1.7.5 (2023-06-15)
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ making it easier for developers to [contribute to Phoenix](#pull-requests).
## Bug reports

A bug is either a _demonstrable problem_ that is caused by the code in the repository,
or indicate missing, unclear, or misleading documentation. Good bug reports are extremely
or indicates missing, unclear, or misleading documentation. Good bug reports are extremely
helpful - thank you!

Guidelines for bug reports:
Expand Down Expand Up @@ -72,7 +72,7 @@ Please provide as much detail and context as possible.
Code documentation (`@doc`, `@moduledoc`, `@typedoc`) has a special convention:
the first paragraph is considered to be a short summary.

For functions, macros and callbacks say what it will do. For example write
For functions, macros, and callbacks say what it will do. For example write
something like:

```elixir
Expand All @@ -82,7 +82,7 @@ Marks the given value as HTML safe.
def safe({:safe, value}), do: {:safe, value}
```

For modules, protocols and types say what it is. For example write
For modules, protocols, and types say what it is. For example write
something like:

```elixir
Expand Down
69 changes: 0 additions & 69 deletions Earthfile

This file was deleted.

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
Loading

0 comments on commit aa442fb

Please sign in to comment.