diff --git a/.github/workflows/echo.yml b/.github/workflows/echo.yml index 136986a2..5a4dff78 100644 --- a/.github/workflows/echo.yml +++ b/.github/workflows/echo.yml @@ -23,8 +23,8 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] # Each major Go release is supported until there are two newer major releases. https://golang.org/doc/devel/release.html#policy # Echo tests with last four major releases (unless there are pressing vulnerabilities) - # As we depend on `golang.org/x/` libraries which only support last 2 Go releases we could have situations when - # we derive from last four major releases promise. + # As we depend on `golang.org/x/` libraries which only support the last 2 Go releases, we could have situations when + # we derive from the last four major releases promise. go: ["1.25"] name: ${{ matrix.os }} @ Go ${{ matrix.go }} runs-on: ${{ matrix.os }} diff --git a/API_CHANGES_V5.md b/API_CHANGES_V5.md index 6c36a7a5..d3ca8156 100644 --- a/API_CHANGES_V5.md +++ b/API_CHANGES_V5.md @@ -6,7 +6,15 @@ Generated: 2026-01-01 --- -## Executive Summary +## Executive Summary (by authors) + +Echo `v5` is maintenance release with **major breaking changes** +- `Context` is now struct instead of interface and we can add method to it in the future in minor versions. +- Adds new `Router` interface for possible new routing implementations. +- Drops old logging interface and uses moderm `log/slog` instead. +- Rearranges alot of methods/function signatures to make them more consistent. + +## Executive Summary (by LLMs) Echo v5 represents a **major breaking release** with significant architectural changes focused on: - **Updated generic helpers** to take `*Context` and rename form helpers to `FormValue*` @@ -1014,6 +1022,18 @@ func NewResponse(w http.ResponseWriter, logger *slog.Logger) *Response ## Migration Guide Summary +If you are using Linux you can migrate easier parts like that: +```bash +find . -type f -name "*.go" -exec sed -i 's/ echo.Context/ *echo.Context/g' {} + +find . -type f -name "*.go" -exec sed -i 's/echo\/v4/echo\/v5/g' {} + +``` +or in your favorite IDE + +Replace all: +1. ` echo.Context` -> ` *echo.Context` +2. `echo/v4` -> `echo/v5` + + ### 1. Update All Handler Signatures ```go diff --git a/README.md b/README.md index 8b9d0278..cbc50ed5 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,15 @@ Click [here](https://github.com/sponsors/labstack) for more information on spons ## [Guide](https://echo.labstack.com/guide) +### Supported Echo versions + +- Latest major version of Echo is `v5` as of 2026-01-18. + - Until 2026-03-31, any critical issues requiring breaking API changes will be addressed, even if this violates semantic versioning. + - See [API_CHANGES_V5.md](./API_CHANGES_V5.md) for public API changes between `v4` and `v5`, notes on upgrading. + - If you are using Echo in a production environment, it is recommended to wait until after 2026-03-31 before upgrading. +- Echo `v4` is supported with **security*** updates and **bug** fixes until **2026-12-31** + + ### Installation ```sh @@ -56,6 +65,7 @@ go get github.com/labstack/echo/v5 ``` Latest version of Echo supports last four Go major [releases](https://go.dev/doc/devel/release) and might work with older versions. + ### Example ```go diff --git a/go.mod b/go.mod index abdbcace..a2480a28 100644 --- a/go.mod +++ b/go.mod @@ -4,13 +4,13 @@ go 1.25.0 require ( github.com/stretchr/testify v1.11.1 - golang.org/x/net v0.48.0 + golang.org/x/net v0.49.0 golang.org/x/time v0.14.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/text v0.32.0 // indirect + golang.org/x/text v0.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 6eb81abf..f1e80fc1 100644 --- a/go.sum +++ b/go.sum @@ -4,10 +4,10 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= -golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= -golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= -golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=